RedHat运维-Linux文本操作基础-echo与sort
1. 给如下文件nowcoder.txt,按照第二个字段排序:
ESTABLISHED 22
TIME_WAIT 9
LISTEN 3
2. 给如下文件nowcoder.txt,按照第二个字段的首字母排序:
ESTABLISHED APPLE
TIME_WAIT BANANA
LISTEN PEAR
3. 给如下文件nowcoder.txt,等号分割,按照第二个字段排序:
ESTABLISHED=22
TIME_WAIT=9
LISTEN=3
4. 给如下文件nowcoder.txt,等号分割,按照第二个字段的首字母排序:
ESTABLISHED=APPLE
TIME_WAIT=BANANA
LISTEN=PEAR
1. sort -k2 -rn
2. sort -k2 -r
3. sort -t "=" -k2 -rn
4. sort -t "=" -k2 -r
1. 使用一个echo命令,输出如下行:
Hello World!
Do you love me?
Yes, I love you!
2. 使用一个echo命令,输出如下行:
This is a beautiful world.
I like it very much!
Don't you think so?
3. 使用一个echo命令,输出如下行:
Hello World!
Don't you think so?
Yes, I love you!
1. echo -e "Hello World!\nDo you love me?\nYes, I love you!"
2. echo -e "This is a beautiful world.\nI like it very much!\nDon't you think so?"
3. echo -e "Hello World!\nDon't you think so?\nYes, I love you!"
原文地址:https://blog.csdn.net/a15735748145a/article/details/140271369
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!