Trying to figure out how to include several rename commands in one shell script that I will save as a cron job.
What I would like to accomplish is renaming different words and also suppress error messages (hence writing > /dev/null 2>&1). I have tried to save the below two lines to rename.sh which only executes the last one (HELLO->hello).
find (path) -maxdepth 1 -type f -exec rename TEST test {} \; > /dev/null 2>&1 find (path) -maxdepth 1 -type f -exec rename HELLO hello {} \; > /dev/null 2>&1 How should I rewrite?
Example filenames:
file1_HELLO.sas7bdatfile2_TEST.sas7bdatfile3_TEST_HELLO.sas7bdat
/dev/nullwhen you run with cron, anything useful?