Author Archives: Linuxgal

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu

PS1

Make your shell prompt useful: PS1=”———————————————————————–\n\u@\W:”

Posted in Uncategorized | Leave a comment

Spell

Check for spelling errors in the Constitution of the United States of America spell cotus.txt | sort | uniq

Posted in Uncategorized | Leave a comment

Which

Find where your stuff is  

Posted in Uncategorized | Leave a comment

Split

Split a large text file into pieces with 10,000 lines each: split -l 10000 starostin-all.txt

Posted in Uncategorized | Leave a comment

Httrack

Mirror a website on your hard drive: Copy all the html files from your local mirror of a website to a single directory: find . -name “*.html” -exec cp {} /home/teresita/Desktop/html \; Convert all the html files in a directory … Continue reading

Posted in Uncategorized | Leave a comment

Rot13

Rot13 “cipher” in #Python #!/usr/bin/python3 import sys, string def rot13(s): return ”.join([chr(x.islower() and ((ord(x) – 84) % 26) + 97 or x.isupper() and ((ord(x) – 52) % 26) + 65 or ord(x)) for x in s]) for line in sys.stdin: … Continue reading

Posted in Uncategorized | Leave a comment

RTF

#LibreOffice Bulk convert RTF files to PDF: libreoffice –convert-to pdf *.rtf

Posted in Uncategorized | Leave a comment

Seq

The sum and product of the first 100 integers: seq -s “+” 1 100 | bc seq -s “*” 1 100 | bc  

Posted in Uncategorized | Leave a comment

Dir

dir –color=always

Posted in Uncategorized | Leave a comment

Nl

Add line numbers to a file (Four digits, leading zeros, separated by a colon): nl -i1 -s’: ‘ -nrz -w4 cotus.txt awk ‘{printf”%04d: “,NR;print}’ cotus.txt Oh wait, you don’t want to count the blank lines? awk ‘/[^ ]/{printf”%04d: “,++n}{print}’ cotus.txt … Continue reading

Posted in Uncategorized | Leave a comment