LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 02-02-2018, 12:33 AM   #1
Swathi Prasad
LQ Newbie
 
Registered: Jan 2018
Posts: 17

Rep: Reputation: Disabled
need help in understanding the command


Can anybody please explain how this command works?

Code:
awk 'NR>1 && /./ { print buf; buf=rs=""} { buf=(buf rs $0); rs=RS } END { if (i=index(buf,RS)) print substr(buf,i+1) }' file1
thanks !!
 
Old 02-02-2018, 12:42 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,081

Rep: Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137Reputation: 4137
which part is unclear?
https://www.linuxquestions.org/quest...nd-4175622351/
 
Old 02-02-2018, 01:42 AM   #3
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,705

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
Start here: http://www.grymoire.com/Unix/Awk.html
 
Old 02-02-2018, 06:16 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,049
Blog Entries: 13

Rep: Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494Reputation: 3494
@Swathi Prasad,

These repeated questions providing zero effort on your part are unacceptable on the LQ site.

You have been referred to our links about how to ask effective questions and informed how the LQ site works on each prior occasion.

This thread and others have been closed to avoid further frustrations on the part of fellow LQ members.

If you persist with repeating this manner of posting, your posting privileges may be affected.
 
1 members found this post helpful.
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help in understanding the command Swathi Prasad Linux - Newbie 6 02-02-2018 06:20 AM
[SOLVED] need help in understanding the command Swathi Prasad Linux - Newbie 3 01-23-2018 10:42 PM
Understanding strace command circus78 Linux - Server 2 04-04-2012 06:18 PM
Need help understanding a command henrtm05 Programming 4 09-26-2010 01:57 PM
help understanding this command vince_2x Linux - General 4 09-21-2004 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration