Get the First Line of Command Output in Shell

Tagged with: , , , , ,

Get just the first line of the output of a command…


<command>|head -n1

ls -1|head -n1

Leave a Reply