I have a file name that I need to cut the first 3 letters of it an put into a variable so I can compare it back to that filename and then do some manipulation from there. I am having issues with the cut command for that.
For example:
fname=paycheck42.txt
I need newname to be pay
Then I want to compare newname to fname and if fname contains pay then the file will go to one directory and if it does not contain pay then it will go to a different directory
For example:
fname=paycheck42.txt
I need newname to be pay
Then I want to compare newname to fname and if fname contains pay then the file will go to one directory and if it does not contain pay then it will go to a different directory