Skip to content

Instantly share code, notes, and snippets.

@zhangyuchi
Created November 23, 2015 07:05
Show Gist options
  • Save zhangyuchi/9ec3491e146e8631a8df to your computer and use it in GitHub Desktop.
Save zhangyuchi/9ec3491e146e8631a8df to your computer and use it in GitHub Desktop.
取文件的第N行
#!/bin/bash
awk -v a=$1 'NR==a {print $1}' $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment