Search Results

Search: Posts Made By: budz26
1,432
Posted By RavinderSingh13
Hello budz26, Could you please try following...
Hello budz26,

Could you please try following and let me know if this helps.

awk 'BEGIN{print "HEADER 1, HEADER 2,HEADER 3,COLUMN1,COLUMN2,COLUMN3"} ($0 ~ /HEADER/ || $0 ~ /COLUMN/ || $0 ~ /^$/...
1,432
Posted By RudiC
Try awk '/HEADER 1/ {HD = $0; getline INTRO;...
Try awk '/HEADER 1/ {HD = $0; getline INTRO; next} /COLUMN1/ {if (!L) print HD, $0; L = 1; next} NF && !/END/ {print INTRO, $0}' FS=, OFS="" file
HEADER 1, HEADER 2, HEADER...
Forum: What is on Your Mind? 12-16-2014
2,624
Posted By Neo
Congratulations to Corona688 for 20,000 Posts!
Please join me in congratulating and thanking Corona688 for 20,000 top quality posts at unix.com !

https://www.unix.com/members/1-albums112-picture651.png
1,510
Posted By Corona688
Try this. The shell should eat the extra spaces:...
Try this. The shell should eat the extra spaces: while read A B C
do
printf "%s\t%s\t%s\n" "$A" "$B" "$C"
done < file > newfile
980
Posted By tukuyomi
awk -F':' '$1=$1' OFS="\t" a.txt (does not...
awk -F':' '$1=$1' OFS="\t" a.txt
(does not fullfill the demanded task, working on a new version...)
New code:
awk '{s="";for(i=1;i<split($1,A,"/");i++){s=s A[i]"/"}
$1=s"\t"A[i]}
$1=$1' FS=':'...
960
Posted By mirni
There is a small slip in the explanation: ...
There is a small slip in the explanation:
Should be
960
Posted By Skrynesaver
if ($filename =~ /x([a-zA-Z0-9_\.]+), [0-9]+...
if ($filename =~ /x([a-zA-Z0-9_\.]+), [0-9]+ bytes/)I suspect it is used to extract a file name from a report as it sets $1 to "name.txt" if the value "xname.txt, 4096 bytes" is found in he variable...
6,467
Posted By DGPickett
What about the reverse test:$ (sleep 1 >file &...
What about the reverse test:$ (sleep 1 >file & fuser file ; echo $? ; wait)
[1] 9098
file: 9098o
0
$The fuser command was intended for viewing or testing stdout, not testing the exit...
Showing results 1 to 8 of 8

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