A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Select sub-section of putty buffer only

Are you sick and tired of waiting for your terminal to scroll down when dragging to select a large portion of the scrollback buffer in putty?

The putty developers already thought of that!


  1. Go to Putty Configuration window
  2. Choose "Selection" from category on the left of the window.
  3. Under 'Control use of mouse', choose 'Compromise (Middle extends, Right pastes)' if not already chosen.

(source)

Outlook 2007: Don't remove line breaks

Microsoft :'-(

Outlook 2007:
Tools | Options | Preferences | E-mail Options
Untick "Remove extra line breaks in plain text messages"

(source)

Split one long line into shorter lines

Command:

fold file_with_long_lines.txt

...prints to STDOUT

Text-based web browsers

  • http://w3m.sourceforge.net/
  • http://lynx.browser.org/
  • http://www.jikos.cz/~mikulas/links/

How to search PDFs on ubuntu

  1. sudo aptitude install poppler-utils
  2. pdftotext file.pdf
  3. grep [search text] file.txt

Text file endings

Mac OS: \r
Unix: \n
Windows: \r\n

Bash: How to loop through a list of terms containing spaces

Change the Internal Field Separator (IFS):

O=$IFS
IFS=$(echo -en "\n\b")
for f in $(ls *)
do
echo "$f"
done
IFS=$O

See hex dump of file on Linux or Mac

hexdump -C [file]

or

cat [file] | xxd