当前位置: 技术问答>linux和unix
跪求Unix命令大神解答
来源: 互联网 发布时间:2017-03-31
本文导语: 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 ...
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
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
同样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是什么?
wc -l file
2、显示列数
set -- `head -1 file`; echo $#
3、显示个数
wc -w file
4、a11是什么?