11 February 2014

These sed commands are handy tools for extracting specific lines from a file using the Linux command line. By replacing LINE_NUMBER with the desired line number, you can quickly retrieve the content of that particular line from the file evm.sql. The first command (sed 'LINE_NUMBERq;d' evm.sql) prints the selected line, while the second command (sed 'LINE_NUMBERq;d' evm.sql | less) is useful for viewing longer lines with the help of less. Simply customize the line number to meet your requirements and efficiently navigate through the file's content.

Source code viewer
  1. # Replace LINE_NUMBER with line number.
  2. sed 'LINE_NUMBERq;d' evm.sql
  3.  
  4. # View the results with less if line is really long.
  5. sed 'LINE_NUMBERq;d' evm.sql | less
Programming Language: Bash