Find the answer to your Linux question:
Results 1 to 4 of 4
Hello All, We are going to migrate from Unix to Linux . So in our script we have used tail +4 which doesn't work in Linux.I will tell you what ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    6

    Substitute for tail +n command in Linux

    Hello All,
    We are going to migrate from Unix to Linux . So in our script we have used tail +4 which doesn't work in Linux.I will tell you what tail +4 does in Unix :
    Suppose There is file named "Hi" which has 10 records then if I give

    cat Hi |tail +4

    It will show me data from 4th record till last record.

    As the same command doesn't work in Linux. I want to sustitute it with some other command or script which will give me the same output. Please reply soon if you have any idea.

    Thanks In Advance!!

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Code:
    tail -n +4 Hi

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    6

    Thanks a Lot :)

    Yes It works ....Thanks a Lot !!!

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi, ISHAVERMA.
    Quote Originally Posted by ISHAVERMA View Post
    ... We are going to migrate from Unix to Linux ...
    Welcome to the forums.

    You will save yourself time if you learn how to use the man pages. For example:
    Code:
           -n, --lines=N
                  output the last N lines, instead of the last 10
    
    -- excerpt from man tail
    Best wishes on the migration ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...