Search Results

Search: Posts Made By: bbmcg
13,636
Posted By neutronscott
Oh, sorry. remove the word "echo".
Oh, sorry. remove the word "echo".
13,636
Posted By Corona688
cat shows the commands. sh runs the commands.
cat shows the commands.

sh runs the commands.
13,636
Posted By Corona688
I'd suggest piping it into 'cat' instead of 'sh'...
I'd suggest piping it into 'cat' instead of 'sh' first, to see if what it prints makes any sense.
13,636
Posted By Peasant
You can try this in working directory : ls...
You can try this in working directory :

ls -1 | sed 's/\(^0\{1,4\}\)\([0-9][0-9]\)\(.*\)/mv & newa0\2.abc/ ' # | sh


After checkin the output pipe it to sh (remove the #) :p
13,636
Posted By Scrutinizer
POSIX: $ f=000012ABCDEFGHIJ.XXX.YYY.ZZZ $...
POSIX:
$ f=000012ABCDEFGHIJ.XXX.YYY.ZZZ
$ f=${f%${f#??????}}
$ echo "newa${f#???}.abc"
newa012.abc
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy