There is no subshell, assignments before a command are only in effect for that command.
Simple-Command-Expansion: Quote:
|
Quote:
Just for fun (and the upcoming obfuscated bash competition): Code:
a=X b=Y c=Z env |
Sorry ntubski, I have given you the wrong info. There should be no dot between the numerals and the song names.
01-01 song with spaces in filename.mp3 01-02 song with spaces in filename.mp3 etc... I have changed the script to (ls *-*\ *.mp3),but it didn't work. Can you explain how does your "cut -d. -f2" work? |
BTW, Files I want to rename are scattered across different folders. for instance, they are all in different subfolders. How can I move them one directory up in order to rename them in batch?
Quote:
EDIT: I have figured it out: in working directory, type Quote:
|
Quote:
Here's a version that assumes the song name is the part that comes after the numbers and dashes. I had to rearrange the loop a bit to handle whitespace. Code:
~/tmp/songs$ while read -d$'\n' song ; do |
All times are GMT -5. The time now is 07:45 PM. |