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.
Head of a Text File #1
Head of a Text File #1
+ 0 comments I don“t need to read the STDIN into a variable, you can just omit the filename in the head command like this:
head -n 20
Or, more simpler:
head -20
+ 0 comments while read file; do echo $file >> file.txt done head -n 20 < file.txt
+ 0 comments #!/bin/bash while read FILE; do echo $FILE >> file.txt done head -n20 < file.txt
+ 0 comments head -n20
+ 0 comments You can find here HackerRank Linux Shell Solutions
Load more conversations
Sort 47 Discussions, By:
Please Login in order to post a comment