Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash return specific lines from history

# Basic syntax:
fc -l start_line end_line # or pipe to sed or awk
history | sed -n 'start_line,end_linep'
history | awk 'NR >= start_line && NR <= end_line'
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #bash #return #specific #lines #history
ADD COMMENT
Topic
Name
7+3 =