Search Results

Search: Posts Made By: Bloomy
1,614
Posted By jim mcnamara
for i in ./dir/*.lab do sed...
for i in ./dir/*.lab
do
sed 's/$/\/Q:_0/' $i > tmp.tmp
mv tmp.tmp $i
done
3,624
Posted By radoulov
If GNU cp is available (if you're on Linux for...
If GNU cp is available (if you're on Linux for example) and if the filenames do not contain pathological characters (newlines or white spaces):

< list xargs cp -t target_dir --If the filenames...
1,787
Posted By radoulov
With shell: for f in *lab; do [ -f...
With shell:

for f in *lab; do
[ -f "${f%.*}".wav ] || {
set -- ${f%${f#??????????????????}}*wav
[ -f "$1" ] && mv -- "$1" "${f%.*}".wav
}
doneIf you have more than one file...
1,903
Posted By yazu
It's not enough, there are tabs after number, so:...
It's not enough, there are tabs after number, so:
perl -pe '$j=sprintf "%05d",++$i;s/\d+\s/$j /' q6.txt
1,903
Posted By bartus11
Try: perl -pe '$j=sprintf "%05d",++$i;s/\d+ "/$j...
Try: perl -pe '$j=sprintf "%05d",++$i;s/\d+ "/$j "/' file
1,477
Posted By Shell_Life
Basically you have three options: 1) Use the...
Basically you have three options:

1) Use the semi-colon separator:
sed 'command1;command2;...;commandn' input_file

2) Use the "-e" option:
sed -e 'command1' -e 'command2' ... -e 'commandn'...
9,193
Posted By ctsgnb
Watch out The Code provided by Michaelrozar...
Watch out

The Code provided by Michaelrozar does not change the indexing of the file so that
chp01_00001.wav
and
chp02_00001.wav

will be respectively moved

from chp01_00001.wav to...
Showing results 1 to 7 of 7

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