was want to search for a specific file on my server and directly edit it within nano.
i tried it like this, but it wont work
find -name file.php | xargs nano $1
the file is found, but it wont work like that
Received SIGHUP or SIGTERM
how to do that proberly?
Another solution is to use backticks if you have to use other command. It's for example useful with git status
:
nano `git status | grep modified | awk '{ print $2 }'`
Or, with find:
nano $(find -name file\*.php)
i found the solution in using find intern exec function
# find -name file.php -exec nano {} \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With