- 给如下文件nowcoder.txt,按照第二个字段排序:
ESTABLISHED 22
TIME_WAIT 9
LISTEN 3
- 给如下文件nowcoder.txt,按照第二个字段的首字母排序:
ESTABLISHED APPLE
TIME_WAIT BANANA
LISTEN PEAR
- 给如下文件nowcoder.txt,等号分割,按照第二个字段排序:
ESTABLISHED=22
TIME_WAIT=9
LISTEN=3
- 给如下文件nowcoder.txt,等号分割,按照第二个字段的首字母排序:
ESTABLISHED=APPLE
TIME_WAIT=BANANA
LISTEN=PEAR
-
sort -k2 -rn
-
sort -k2 -r
-
sort -t "=" -k2 -rn
-
sort -t "=" -k2 -r
-
使用一个echo命令,输出如下行:
Hello World!
Do you love me?
Yes, I love you!
- 使用一个echo命令,输出如下行:
This is a beautiful world.
I like it very much!
Don't you think so?
- 使用一个echo命令,输出如下行:
Hello World!
Don't you think so?
Yes, I love you!
-
echo -e "Hello World!\nDo you love me?\nYes, I love you!"
-
echo -e "This is a beautiful world.\nI like it very much!\nDon't you think so?"
-
echo -e "Hello World!\nDon't you think so?\nYes, I love you!"