小编Neo*_*aid的帖子

如何按 DD-MM-YYYY 日期对文件进行排序

在包含以下内容的文件中:

...
18-11-2018:othercharacters
10-11-2018:othercharacters
03-10-2018:othercharacters
30-10-2018:othercharacters
27-09-2018:othercharacters
03-12-2018:othercharacters
...
Run Code Online (Sandbox Code Playgroud)

命令 :

sort -t- -k2 -k1 
Run Code Online (Sandbox Code Playgroud)

不按日期排序,我错过了什么?

terminal date sort

2
推荐指数
1
解决办法
3113
查看次数

Why do I need to type exit twice in my terminal?

I am not using two users nor do I open root or something . I open terminal, and I only exit after the second exit command.

在此处输入图片说明

This is my .bashrc file:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See …
Run Code Online (Sandbox Code Playgroud)

command-line bash terminal

1
推荐指数
1
解决办法
1548
查看次数

标签 统计

terminal ×2

bash ×1

command-line ×1

date ×1

sort ×1