We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Linux Shell
  3. Text Processing
  4. Middle of a Text File
  5. Discussions

Middle of a Text File

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 92 Discussions, By:

recency

Please Login in order to post a comment

  • florin_tanasa
    3 weeks ago+ 0 comments
    #!/bin/bash
    rm file.txt > stdout.tx 2> stderr.txt
    while read LINES;
    do
    echo $LINES >> file.txt
    done
    (head -n22 | tail -n11) < file.txt
    
    0|
    Permalink
  • jonatanivanhoe
    2 months ago+ 0 comments
    head -n 22 | tail -11
    
    -2|
    Permalink
  • Pyloris
    2 months ago+ 0 comments

    tail +12 | head -n 11

    0|
    Permalink
  • kamranalv01
    3 months ago+ 0 comments

    head -22 | tail -11

    1|
    Permalink
  • mahmoudswailam11
    4 months ago+ 0 comments

    head -n 22 | tail -n +12

    2|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy