Paul Paul - 8 months ago 45
Bash Question

Find shell script and rename row

I have shell script with name I need to find this script and change value inside script


bash $current_dir/



my solution is something like:

find -maxdepth 10 -name "" -exec sed -i 's#bash '$current_dir'' {} \ ;

But still my command does not work. Any idea how to replace this string in new string in my shell script?


Your sed expression seems to be the issue.

You can use:

find . -maxdepth 10 -name "" -exec sed -i 's#bash \$current_dir/run\.sh#./' {} +