Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

sort in linux

Command :
$ sort -n file1.txt
Output :
15
39
50
89
200
Comment

sort in linux

$ sort -n filename.txt
Comment

sort linux

# sort command sorts outuputs alphabetically as for example:
cat file | sort # a b b c
sort -r file # sorts reversely: c b b a
sort -u file # sorts and outputs uniquely: c b a
sort -n file2 # sorts numerically: 1 2 3
Comment

sort in linux

Command :
$ cat > file1.txt
50
39
15
89
200
Comment

sort in linux

Command :
$ sort -r file.txt
Output :
satish
rajan
naveen 
harsh
divyam
chitransh
abhishek
Comment

sort in linux

$ sort -r inputfile.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: install macos on vmware ubuntu 
Shell :: bash if with function call 
Shell :: how to push git branch to remote 
Shell :: download gif 
Shell :: how to use yes command in linux 
Shell :: git clone with branch name command 
Shell :: linux change directory 
Shell :: authentication failed for git 
Shell :: git remove file 
Shell :: zip command in linux 
Shell :: run tar.xz ubuntu 
Shell :: grep a variable 
Shell :: créer un script linux 
Shell :: selinux 
Shell :: renommer la branche main de git 
Shell :: mac shell echo command 
Shell :: scp command in unix 
Shell :: background ubuntu 
Shell :: dir command windows 
Shell :: how to uninstall django 
Shell :: authentication failed github 
Shell :: aws s3 change bucket region 
Shell :: grep substring 
Shell :: blue ocean jenkins 
Shell :: kubernetes setup 
Shell :: linux run multipel comands in one line 
Shell :: how to install rpm package opensuse 
Shell :: Overwrite Line Batch 
Shell :: The following signatures were invali gpg 
Shell :: instalacion mkweb 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =