有没有办法获取整数,wc返回的bash?
原文链接:https://www.f2er.com/bash/392155.html基本上我想把行号和字计数写入文件名后的屏幕。
output:filename linecount wordcount
这里是我到目前为止:
files=`ls` for f in $files; do if [ ! -d $f ] #only print out information about files !directories then # some way of getting the wc integers into shell variables and then printing them echo "$f $lines $ words" fi done