Paul Paul - 1 year ago 130
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?

Answer Source

Your sed expression seems to be the issue.

You can use:

find . -maxdepth 10 -name "" -exec sed -i 's#bash \$current_dir/run\.sh#./' {} +
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download