跪求Unix命令大神解答
1:Write a UNIX command to count the number of rows in the matrix.
2:Write a UNIX command to count the number of columns in the
matrix.
3:Write a UNIX command to count the total number of entries in the
matrix.
4:Write a UNIX command to display the element a11.
PS: Do not use awk, sed
[解决办法]
cat a
[解决办法]
wc -l 这样的最好不要cat 直接wc -l a
同样head -n2 a
[解决办法]
tail -n1
[解决办法]
cut -d" " --fields=2
[解决办法]
1、显示行数
wc -l file
2、显示列数
set -- `head -1 file`; echo $#
3、显示个数
wc -w file
4、a11是什么?