Search Results

Search: Posts Made By: johnstrong
2,824
Posted By Scott
Taking what you already have: $ ls...
Taking what you already have:


$ ls *.dat.old | sed 'p;s/.dat.old/_N.dat/' | xargs -n2 mv
2,824
Posted By cfajohnson
for file in *.dat.old do mv "$file"...
for file in *.dat.old
do
mv "$file" "${file%.dat.old}_N.dat"
done
3,427
Posted By birei
Hi, Test this solution. The last character...
Hi,

Test this solution. The last character is '*', witch selects all files in the directory where you run the script.

$ perl -e 'while (@ARGV) { ($param = $ARGV[0]) =~ s/(.*)\..*/\1/ ; print...
Showing results 1 to 3 of 3

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