Command-line
Linux
Text processing Format
IASP 321 IASP 221
Text File
- Dr. John Yoon
Text processing Format Text File IASP 321 IASP 221 Dr. John Yoon - - PowerPoint PPT Presentation
Command-line Linux Text processing Format Text File IASP 321 IASP 221 Dr. John Yoon Text Processing Commands cat cat > foo.txt sort sort foo.txt sort foo.txt | uniq -c uniq du s /usr/share/* | sort nr | head
Text File
cat > foo.txt sort foo.txt sort foo.txt | uniq -c du –s /usr/share/* | sort –nr | head ls -l /usr/bin | sort -nr -k 5 sort --key=1,4 --key=2n linuxDistriShort.txt sort --key=2,3 --key=2n linuxDistriShort.txt cut -f 7 LinuxDistributors.txt | cut -c 1-4 diff a.txt b.txt
sort set1.txt > set1s.txt sort set2.txt > set2s.txt comm set1s.txt set2s.txt
for ((i=1;i<=10;i++)); do echo "You earn" $[$i*10] >> helloM2.data; done for ((i=1;i<=10;i++)); do echo "Hello Mercy" $i >> helloMercy.txt; done paste helloMercy.txt helloM2.data
Computation in [ ] Treat as a variable Run this on a shell command prompt, e.g., jyoon@UbuntuServer:~$
echo "Mercy Cybersecurity" | tr a-zA-Z n-za-mN-ZA-M echo "Mercy CyberSecurity" | tr a-zA-Z n-za-mA-Z
join numMercy.data numMondy.data for ((i=1;i<=10;i++)); do echo $i "of Mercy" >> numMercy.data; done for ((i=1;i<=10;i++)); do echo $i "has " $[$i*100] >> numMondy.data; done
Run this on a shell command prompt, e.g., jyoon@UbuntuServer:~$
The package should be installed and link real printer devices