Search Results

Search: Posts Made By: Shahul
1,078
Posted By Shahul
$ sort -k1 sort.txt POL B7U6K8 ...
$ sort -k1 sort.txt
POL B7U6K8 Avian_reticuloendotheliosis_virus
POL E6ZGJ1 Dicentrarchus_labrax
POL E6ZGJ4 Dicentrarchus_labrax
POL F4Y5K7 Avian_reticuloendotheliosis_virus...
1,640
Posted By Shahul
df -h|nawk '{gsub(/%/,"");if($5>70)print}' ...
df -h|nawk '{gsub(/%/,"");if($5>70)print}'


Thanks
Sha
14,298
Posted By Shahul
nawk 'NR==FNR{a[$1]=$1;b[$0]=$0;next}($1 in a)&&...
nawk 'NR==FNR{a[$1]=$1;b[$0]=$0;next}($1 in a)&& !($0 in b)' file1 file2


Thanks
SHa
1,040
Posted By Shahul
This will help you... nawk -F':' -v...
This will help you...


nawk -F':' -v v1="11:30:00" -v v2="11:40:00" 'OFS=":"{v=$1":"$2":"$3}{if(v>v1 && v<v2)print}' inputfile
11:32:36:124.id_0000.1:"blalba"
11:33:49:124.id_0000.1:"blalba"...
2,121
Posted By Shahul
nawk '{if(NR==5){system("sed -n '4p' file2")}...
nawk '{if(NR==5){system("sed -n '4p' file2")} else {print}}' file1
29
4,767
Posted By Shahul
$ nawk '{if(NF>10) {print $0"-"NR"\n"$0} else...
$ nawk '{if(NF>10) {print $0"-"NR"\n"$0} else {print $0}}' input.txt|nawk 'NF>11 {$2="EUR"$3;$3="";$NF=""}{print |"sort -n -k3 -r"}'


Thanks
Sha
9,456
Posted By Shahul
u can replace multiple occurance in the same sed...
u can replace multiple occurance in the same sed itself for making change inside file.

sample one.


echo "first string,Second string"|sed 's/first/test1/g;s/second/test2/g'
test1...
4,206
Posted By Shahul
sed -n '$=' filename Thanks Sha
sed -n '$=' filename


Thanks
Sha
2,754
Posted By Shahul
nawk -F'\\' 'OFS=":"{for(i=1;i<NF;i++)...
nawk -F'\\' 'OFS=":"{for(i=1;i<NF;i++) {if($i!~/^$/) print $i,length($i)}}' filename
folder name :12
folder1 :9
folder2 :9
folder3 :9
Showing results 1 to 9 of 9

 

Featured Tech Videos

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