Grouping records with awk2019 Community Moderator ElectionText to yaml conversionHow to use awk-it in Emacs?Extract paragraph separated with *** using AWKWant to print NULL if value is not present as awk outputWhy the output of “column” is misaligned with a ANSI colored input?Inserting a blank line after change in first alphabet using awkcommand substitution inside awkAwk command failing during the redirection with null sting valueHow to get a count of variables passed to awkawk is not working for my requirement
Good for you! in Russian
If one operation is wrong then the whole transaction is wrong
Distinction between apt-cache and dpkg -l
Aliens englobed the Solar System: will we notice?
What to do when during a meeting client people start to fight (even physically) with each others?
GPLv2 - licensing for commercial use
Grey hair or white hair
Finding algorithms of QGIS commands?
Should I tell my boss the work he did was worthless
Is it true that real estate prices mainly go up?
Word-Letter Ladder
Are babies of evil humanoid species inherently evil?
Bash script should only kill those instances of another script's that it has launched
Why would one plane in this picture not have gear down yet?
Should I take out a loan for a friend to invest on my behalf?
PTIJ: How can I halachically kill a vampire?
Tricky AM-GM inequality
Why does Beresheet is doing a only a one-way trip?
Can Mathematica be used to create an Artistic 3D extrusion from a 2D image and wrap a line pattern around it?
What are some noteworthy "mic-drop" moments in math?
What Happens when Passenger Refuses to Fly Boeing 737 Max?
In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?
What's the "normal" opposite of flautando?
Is this combination of Quivering Palm and Haste RAW?
Grouping records with awk
2019 Community Moderator ElectionText to yaml conversionHow to use awk-it in Emacs?Extract paragraph separated with *** using AWKWant to print NULL if value is not present as awk outputWhy the output of “column” is misaligned with a ANSI colored input?Inserting a blank line after change in first alphabet using awkcommand substitution inside awkAwk command failing during the redirection with null sting valueHow to get a count of variables passed to awkawk is not working for my requirement
I want to group records 7 by 7 and after print some fields.
For example the text below:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78
$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79
$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50
$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71
$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E
$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56
$GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
Must stay like this:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B $GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F $GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56 $GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
And after I need to select some fileds with print command.
Why the script below is not working?
#!/usr/bin/awk -f
BEGIN
F=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
linux awk windows
add a comment |
I want to group records 7 by 7 and after print some fields.
For example the text below:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78
$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79
$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50
$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71
$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E
$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56
$GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
Must stay like this:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B $GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F $GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56 $GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
And after I need to select some fileds with print command.
Why the script below is not working?
#!/usr/bin/awk -f
BEGIN
F=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
linux awk windows
1
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of yourawk
script. Do you meanORS = NR % 7 ? FS:RS; print $1,$3,$5
?
– Bodo
2 hours ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago
add a comment |
I want to group records 7 by 7 and after print some fields.
For example the text below:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78
$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79
$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50
$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71
$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E
$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56
$GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
Must stay like this:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B $GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F $GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56 $GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
And after I need to select some fileds with print command.
Why the script below is not working?
#!/usr/bin/awk -f
BEGIN
F=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
linux awk windows
I want to group records 7 by 7 and after print some fields.
For example the text below:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78
$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79
$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50
$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F
$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B
$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71
$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75
$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E
$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56
$GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
Must stay like this:
$GPGGA,132300.000,2254.5838,S,04310.9530,W,1,6,1.76,-0.8,M,-5.6,M,,*63$GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B $GPGSV,3,1,12,20,55,326,,29,52,115,37.6,21,50,221,38.6,25,41,006,*78$GPGSV,3,2,12,26,27,229,38.8,15,26,076,33.4,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,24.5,05,05,142,24.6,16,03,215,*79$GPRMC,132300.000,A,2254.5838,S,04310.9530,W,0.931,340.03,080319,,,A*50$GPVTG,340.03,T,,M,0.931,N,1.726,K,A*30
$GPGGA,132301.000,2254.5834,S,04310.9531,W,1,6,1.76,-0.8,M,-5.6,M,,*6F $GPGSA,A,3,21,13,15,29,26,05,,,,,,,1.97,1.76,0.90*0B$GPGSV,3,1,12,20,55,326,,29,52,115,36.0,21,50,221,36.6,25,41,006,*71$GPGSV,3,2,12,26,27,229,36.9,15,26,076,31.9,10,25,330,,31,09,287,*75$GPGSV,3,3,12,12,09,023,,13,08,105,18.4,05,05,142,22.9,16,03,215,*7E$GPRMC,132301.000,A,2254.5834,S,04310.9531,W,0.965,339.06,080319,,,A*56 $GPVTG,339.06,T,,M,0.965,N,1.789,K,A*3F
And after I need to select some fileds with print command.
Why the script below is not working?
#!/usr/bin/awk -f
BEGIN
F=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
linux awk windows
linux awk windows
edited 1 hour ago
user2697605
asked 2 hours ago
user2697605user2697605
17913
17913
1
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of yourawk
script. Do you meanORS = NR % 7 ? FS:RS; print $1,$3,$5
?
– Bodo
2 hours ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago
add a comment |
1
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of yourawk
script. Do you meanORS = NR % 7 ? FS:RS; print $1,$3,$5
?
– Bodo
2 hours ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago
1
1
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of your
awk
script. Do you mean ORS = NR % 7 ? FS:RS; print $1,$3,$5
?– Bodo
2 hours ago
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of your
awk
script. Do you mean ORS = NR % 7 ? FS:RS; print $1,$3,$5
?– Bodo
2 hours ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
The input field separator variable when used inside the ..
needs to be FS
and not just F
. You need to modify the initialization of the input field separator to
#!/usr/bin/awk -f
BEGIN
FS=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
Also the action part of your awk
command needs to be within the ..
as update above, so that the part applies for each line of input file.
You can reproduce the behaviour of setting the input field separator to a wrong variable by a very trivial example as
awk 'BEGIN F="," print $1 ' <<<"a,b,c"
a,b,c
will emit the whole string as a,b,c
as awk
did not recognize the variable set in the BEGIN
clause. It just understands it as some user-defined variable rather than a special variable set for splitting the input records.
The same example works if the special variable is set properly
awk 'BEGIN FS="," print $1 ' <<<"a,b,c"
a
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505895%2fgrouping-records-with-awk%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The input field separator variable when used inside the ..
needs to be FS
and not just F
. You need to modify the initialization of the input field separator to
#!/usr/bin/awk -f
BEGIN
FS=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
Also the action part of your awk
command needs to be within the ..
as update above, so that the part applies for each line of input file.
You can reproduce the behaviour of setting the input field separator to a wrong variable by a very trivial example as
awk 'BEGIN F="," print $1 ' <<<"a,b,c"
a,b,c
will emit the whole string as a,b,c
as awk
did not recognize the variable set in the BEGIN
clause. It just understands it as some user-defined variable rather than a special variable set for splitting the input records.
The same example works if the special variable is set properly
awk 'BEGIN FS="," print $1 ' <<<"a,b,c"
a
add a comment |
The input field separator variable when used inside the ..
needs to be FS
and not just F
. You need to modify the initialization of the input field separator to
#!/usr/bin/awk -f
BEGIN
FS=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
Also the action part of your awk
command needs to be within the ..
as update above, so that the part applies for each line of input file.
You can reproduce the behaviour of setting the input field separator to a wrong variable by a very trivial example as
awk 'BEGIN F="," print $1 ' <<<"a,b,c"
a,b,c
will emit the whole string as a,b,c
as awk
did not recognize the variable set in the BEGIN
clause. It just understands it as some user-defined variable rather than a special variable set for splitting the input records.
The same example works if the special variable is set properly
awk 'BEGIN FS="," print $1 ' <<<"a,b,c"
a
add a comment |
The input field separator variable when used inside the ..
needs to be FS
and not just F
. You need to modify the initialization of the input field separator to
#!/usr/bin/awk -f
BEGIN
FS=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
Also the action part of your awk
command needs to be within the ..
as update above, so that the part applies for each line of input file.
You can reproduce the behaviour of setting the input field separator to a wrong variable by a very trivial example as
awk 'BEGIN F="," print $1 ' <<<"a,b,c"
a,b,c
will emit the whole string as a,b,c
as awk
did not recognize the variable set in the BEGIN
clause. It just understands it as some user-defined variable rather than a special variable set for splitting the input records.
The same example works if the special variable is set properly
awk 'BEGIN FS="," print $1 ' <<<"a,b,c"
a
The input field separator variable when used inside the ..
needs to be FS
and not just F
. You need to modify the initialization of the input field separator to
#!/usr/bin/awk -f
BEGIN
FS=","
ORS = NR % 7 ? FS:RS; print $1,$3,$5
Also the action part of your awk
command needs to be within the ..
as update above, so that the part applies for each line of input file.
You can reproduce the behaviour of setting the input field separator to a wrong variable by a very trivial example as
awk 'BEGIN F="," print $1 ' <<<"a,b,c"
a,b,c
will emit the whole string as a,b,c
as awk
did not recognize the variable set in the BEGIN
clause. It just understands it as some user-defined variable rather than a special variable set for splitting the input records.
The same example works if the special variable is set properly
awk 'BEGIN FS="," print $1 ' <<<"a,b,c"
a
edited 1 hour ago
answered 2 hours ago
InianInian
4,9731329
4,9731329
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505895%2fgrouping-records-with-awk%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-awk, linux, windows
1
Please edit your question to show your input formatted as a code block. Show also the output you get and what you want to get. There is a syntax error in the last line of your
awk
script. Do you meanORS = NR % 7 ? FS:RS; print $1,$3,$5
?– Bodo
2 hours ago
Not able to understand your requirement
– Praveen Kumar BS
1 hour ago