DOS to Linux conversion
Hey folks...
I am trying to figure out how to do the equivalent of the DOS command 'FOR %F in (*.TXT) DO [command].
The short term goal is to loop through a directory of text files and append a tilde to the end of each file "~". I have been trying things like 'for file in list; do echo "~" >> file; done but I am not having any luck. Can someone point me in the right direction? I'd like to know how to loop through all the files and perform actions on them.
Thanks!
ETA: I figured it out! (for file in *.txt; do echo "~" >> $file; done )
I am trying to figure out how to do the equivalent of the DOS command 'FOR %F in (*.TXT) DO [command].
The short term goal is to loop through a directory of text files and append a tilde to the end of each file "~". I have been trying things like 'for file in list; do echo "~" >> file; done but I am not having any luck. Can someone point me in the right direction? I'd like to know how to loop through all the files and perform actions on them.
Thanks!
ETA: I figured it out! (for file in *.txt; do echo "~" >> $file; done )
