Sort by

recency

|

49 Discussions

|

  • + 0 comments

    head -n 20

  • + 0 comments
    #!/bin/bash
    
    head -n 20 
    
  • + 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