How to get first line of output from command line?
Enter your command (example: ls -l
) then the head
command with a pipe like so:
ls -l | head -1
Enter your command (example: ls -l
) then the head
command with a pipe like so:
ls -l | head -1