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 :: deploy a static website to heroku 
Shell :: how to download files from linux server 
Shell :: install kubernetes on ubuntu 
Shell :: backtick ubuntu 
Shell :: bash find string in program output 
Shell :: sudo: apt: command not found 
Shell :: list files recursively 
Shell :: how to install simple screen recorder in fedora 
Shell :: powershell array index 
Shell :: print batch 
Shell :: docker quickstart terminal windows 
Shell :: how to execute an sh file in linux 
Shell :: git worktree prune 
Shell :: how to take a screenshot linux terminal 
Shell :: crontab edit 
Shell :: how to make apache not run automatically linux 
Shell :: terminal rename folder 
Shell :: uninstall apt package ubuntu 20.04 
Shell :: To set the exit status of a shell script 
Shell :: .aws directory not found 
Shell :: or push an existing repository from the command line 
Shell :: git rename older local commit 
Shell :: run powershell script by clicking 
Shell :: how to install raspap 
Shell :: deploy to firebase using trivis 
Shell :: install 
Shell :: docker run image 
Shell :: stash with name 
Shell :: install macos on vmware ubuntu 
Shell :: make new branch in git 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =