Skip to content

Instantly share code, notes, and snippets.

@bombless
Last active May 26, 2023 08:44
Show Gist options
  • Save bombless/cf5bf325023262a1556172a5bca08e8b to your computer and use it in GitHub Desktop.
Save bombless/cf5bf325023262a1556172a5bca08e8b to your computer and use it in GitHub Desktop.
新学的命令行
# 读取当前目录下这些目录中各有多少文件
ls . |awk -F ' ' '{("find "$1" |wc -l") | getline n;print n "\t" $1}'
# 从命令输出而不是文件名得到一个文件流重定向
awk '{print "hello,",$0}' <(echo mr. white)
# 在命令的任意位置指定重定向到文件
echo Hello, world. > hello Nice to meet you!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment