Search Results

Search: Posts Made By: yomaya
2,348
Posted By itkamaraj
$ nawk -F, '{if(a!=$4){print "----------";print...
$ nawk -F, '{if(a!=$4){print "----------";print $0;a=$4}else{print $0;a=$4}}END{print "-----------"}' input.txt
----------
col1,col2,col3,CODE_0, ... , colN
col1,col2,col3,CODE_0, ... , colN...
2,348
Posted By balajesuri
Append this in tyler_durden's perl one-liner: ;...
Append this in tyler_durden's perl one-liner:
; END{print "-"x40}' f48
2,348
Posted By tarun_agrawal
try this awk 'NR%4==0{print...
try this


awk 'NR%4==0{print "--------------";next;} {print} END{print "--------------"}' filename
2,348
Posted By durden_tyler
If Perl is an option, then here's one way - ...
If Perl is an option, then here's one way -


$
$
$ cat f48
col1,col2,col3,CODE_0, ... , colN
col1,col2,col3,CODE_0, ... , colN
col1,col2,col3,CODE_1, ... , colN
col1,col2,col3,CODE_1, ......
2,348
Posted By muralikrishna
#!/bin/bash oldtag=nothing while read line ...
#!/bin/bash
oldtag=nothing
while read line
do
newtag=(echo $line|cut -d "," -f4)
if [ $oldtag != $newtag ]; then
echo "-------------------------------------" >> newfile
fi
echo $line >>...
Showing results 1 to 5 of 5

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