Search Results

Search: Posts Made By: DevAakash
3,049
Posted By RudiC
How about (untested) <file2 tr , $'\n' |...
How about (untested)

<file2 tr , $'\n' | paste -d: - <(cut -d: -f2 file1)
3,049
Posted By RavinderSingh13
Hello DevAakash, Could you please try...
Hello DevAakash,

Could you please try following.

awk 'FNR==NR{for(i=1;i<=NF;i++){a[i]=$i};next} {print a[FNR],$2}' FS="," Input_file2 FS=":" OFS=":" Input_file1


Thanks,
R. Singh
3,049
Posted By nezabudka
awk -F": ?" 'NR==1 {split($0, arr, ",");next}...
awk -F": ?" 'NR==1 {split($0, arr, ",");next} {print arr[FNR]":"$2}' File2 File1
01:fail
02:Pass
03:skipped
3,049
Posted By anbu23
$ awk -F: -v list="01,02,03" ' NR==1 {...
$ awk -F: -v list="01,02,03" ' NR==1 { split(list,arr,",") } { sub("tcname",arr[NR]) } 1 ' OFS=: File1
01:fail
02: Pass
03:skipped
4,390
Posted By nezabudka
May be so, sorry I don't quite understand awk...
May be so, sorry I don't quite understand
awk 'BEGIN {print "<body><html>\n<tr>"}; FNR == 1 && NR != 1 {print "</tr>\n<tr>"} END {print "</tr>\n</body></html>"} 1' $(<splitfile.txt)
4,478
Posted By jgt
Create xm1 while read a do read b ...
Create xm1


while read a
do
read b
echo $a $b
done


grep -v "<" text.xml |grep -v ">" |./xm1
4,478
Posted By nezabudka
sed -n '/<value>/ {n;h}; /<result>/...
sed -n '/<value>/ {n;h}; /<result>/ {:1;n;/<\/result>/! {H;b1};x;s/\n/ /g;p}'

--- Post updated at 09:07 ---

sed -n '/<value>/ {n;h}; /<result>/! b; :1;n;/<\/result>/! {H;b1};x;s/\n/ /g;p'
4,478
Posted By nezabudka
sed -n '/<value>\|<result>/ {n;p}' file ---...
sed -n '/<value>\|<result>/ {n;p}' file

--- Post updated at 23:34 ---

awk '/<value>/ {getline tmp}; /<result>/ {getline; print tmp,$0}' file

--- Post updated at 23:38 ---

sed -n...
Showing results 1 to 8 of 8

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