Search Results

Search: Posts Made By: indira_s
934
Posted By RavinderSingh13
Hello Indira_s, one more approach for same....
Hello Indira_s,

one more approach for same.



while read line
do
value=`echo $line | awk -F":" '{print $2}'` ### taking the second column for a1 file ###
check_value_other_file=`cat...
934
Posted By Akshay Hegde
$ awk -F":" 'FNR==NR{A[$2];next}!($2 in A){print...
$ awk -F":" 'FNR==NR{A[$2];next}!($2 in A){print $0, "is not there"}' file2 file1-F":" --> Field separator is set to :

FNR == NR

FNR variable--> Current line number in the current file
...
934
Posted By Akshay Hegde
Codetags please $ cat file1 a1:1 a1:2 ...
Codetags please

$ cat file1
a1:1
a1:2
a1:3
a1:4
a1:5
a1:6
a1:7
a1:8
a1:9
a1:10$ cat file2
a2:1
a2:3
a2:4
a2:6
a2:8
a2:2
a2:5
1,613
Posted By RudiC
Try reading from your mailid.txt line by line,...
Try reading from your mailid.txt line by line, adding each entry read to the MAIL_DBA variable, finally removing the leading comma:$ while read; do MAIL_DBA=$MAIL_DBA,$REPLY ; done < mailid.txt;...
1,613
Posted By Yoda
Or use paste command: MAIL_DBA=$( paste -s...
Or use paste command:
MAIL_DBA=$( paste -s -d"," /home/abc/mailid.txt )
1,354
Posted By Klashxx
I like this ( if gawk is avaliable ): gawk...
I like this ( if gawk is avaliable ):
gawk 'match($0,/:[[:space:]]+([[:digit:]]+)[[:space:]]+Kbytes/,e){print e[1]}'
1,354
Posted By Yoda
Replace existing awk program with: awk '{...
Replace existing awk program with:
awk '{ gsub(/.*: |Kbytes.*/,x); print } '
OR
awk '{ gsub(/.*: |Kbytes.*/,x) } 1'
OR
awk '{ gsub(/.*: |[a-zA-Z]*/,x) } 1'
1,354
Posted By Scrutinizer
awk '{print $(NF-2)}'
awk '{print $(NF-2)}'
Showing results 1 to 8 of 8

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