Hi folks,
I'd like to create a little script that reads the lines from another script, changes them and writes them into a new file.
Something like that:
Sourcefile
----------
read input
find / -name $input
uname -a
Destination file is supposed to look like this:
-----------------------------------------------
echo "read input"
read input
echo "find / -name $input"
find / -name $input
echo "uname -a"
uname -a
Okay, maybe this is not the most elegant way to accomplish what I want, but it is the only way I can think of right now.
The goal is to change a script to echo the line that is being executed so that I can see where it hangs. I have a script that won't finish but is not giving me any errors and it's got way too many lines to change them all manually.
Any ideas what i could do here ?
Regards
Thomas
I'd like to create a little script that reads the lines from another script, changes them and writes them into a new file.
Something like that:
Sourcefile
----------
read input
find / -name $input
uname -a
Destination file is supposed to look like this:
-----------------------------------------------
echo "read input"
read input
echo "find / -name $input"
find / -name $input
echo "uname -a"
uname -a
Okay, maybe this is not the most elegant way to accomplish what I want, but it is the only way I can think of right now.
The goal is to change a script to echo the line that is being executed so that I can see where it hangs. I have a script that won't finish but is not giving me any errors and it's got way too many lines to change them all manually.
Any ideas what i could do here ?
Regards
Thomas