Search Results

Search: Posts Made By: dsedi
3,298
Posted By palanisvr
for i in `cat file` do fld1=`echo $i | tr -d...
for i in `cat file`
do
fld1=`echo $i | tr -d '[0-9]'`
fld2=`echo $i | tr -d '[a-z]' |tr -d '[A-Z]'`
echo $fld1 " " $fld2 >> tmp.txt
sort -n -k2 tmp.txt |awk -F ' ' '{print $1$2}'
rm -f tmp.txt...
3,298
Posted By radoulov
printf '%s\n' mysample* | sort -k1.9nSome ls...
printf '%s\n' mysample* | sort -k1.9nSome ls implementations (the one from the GNU coreutils, for example) support the -v option (for natural sort of (version) numbers within text):

ls -v1...
3,298
Posted By franzpizzo
It is not nice but it works printf...
It is not nice but it works


printf "mysample%d\n" $( ls -1 mysample*|sed 's/mysample//'| sort -n )
Showing results 1 to 3 of 3

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