Search Results

Search: Posts Made By: csim_mohan
2,176
Posted By Don Cragun
Note that neither the sample input nor the sample...
Note that neither the sample input nor the sample output you provided contained any tab characters. The following will work with fields separated by any combination of one or more commas, spaces,...
1,317
Posted By in2nix4life
sed -r 's#(\w+)com#\1\.com#g' infile
sed -r 's#(\w+)com#\1\.com#g' infile
2,066
Posted By MadeInGermany
Or this one? awk 'BEGIN {OFS=FS="\t"} {s="";...
Or this one?
awk 'BEGIN {OFS=FS="\t"} {s=""; for (col=2; col<=3; col++) {sep=""; n=split ($col,T,"[ ,<>]+"); for (i=1;i<=n;i++) if (NR==1 ||...
2,066
Posted By RudiC
Not clear. Please rephrase carefully. EDIT:...
Not clear. Please rephrase carefully.

EDIT: Guessing wildly:awk 'BEGIN {OFS=FS="\t"} {n=split ($3, T, " "); $3=""; for (i=1;i<=n;i++) if (T[i]~/www|http|ftp|mailto|Text/) $3=$3 T[i];print $2,$3}'...
1,866
Posted By ygemici
# awk -F'[ ;]'...
# awk -F'[ ;]' 'NR==FNR{a[$1]=$2;next}{for(i=1;i<=NF;i++)if(($i in a))for(j in a){print $1,j,a[j];next}}' filea fileb
バーストリミット sm982882 sm1893548


regards
ygemici
1,866
Posted By Scrutinizer
Hi, you were on your way, but you need to...
Hi, you were on your way, but you need to distinguish the phases in which you are processing filea or fileb. When NR is equal to FNR, awk is processing the first file which in this case is fileb....
Showing results 1 to 6 of 6

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