Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shell command read first lines

# credit to the Stack Overflow user in the source link
# the line is stored in a variable, remove 'line=' to print on display

line=$(head -n 1 filename)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #shell #command #read #lines
ADD COMMENT
Topic
Name
1+5 =