Linux shell command questions
Hi all,
1. how can I rename multiple files to SUBTRACT characters from the original name, rather than add, kinda the opposite of what you do with for file.....done command, like: for file in *.old; do mv -v $file ---here I want to rename the file from barbie.txt.old back to barbie.txt done 2. how can I delete shell variable? 3. in OPENNA when Ctrl+D nothing happens 4. will !ch insert most recent command that started with ch? like if I had chmod 770, will !ch insert chmod 770? Thanks in advance |
I'd use sed s/old.txt/txt (dunno if you need a \ before the . ?) but then I take long winded ways of doing things.
|
thanks, do you mean
for file in *.old; do sed s/old.txt/txt done That didn't do it |
1. Try this command
for F in *.old do mv -v "$F" ${F%.old} done 2. unset <variable> |
thanks, I'll give it a shot
|
All times are GMT -5. The time now is 07:48 PM. |