All Tips


7

Tip #81   Emailing from server

/bin/mail -s "Enter Subject Line here" -a
/home/.../whateverFileYouWantAttached.txt
"you@YourEmailAddress"
< /home/me/textBody.letter Read more »
  • TAGS:

3

Tip #87  

Perform a recursive grep of the Solaris /etc directory, bypassing those nasty sockets Sun keeps in there:
Read more »

9

Tip #88   a better cut

use `grep -o` to select only the pattern matched rather than the whole line:

Read more »

7

Tip #89   Multiple column sort

sort a file by the first column in dictionary order, then by the second column numerically.

Read more »

7

Tip #90   Strip header

Strip the header line from a file:

Read more »

10

Tip #91   another solution to #67

For a fix of #67 that is a bit nicer

for support spaces in the arguments just fine, just make sure you quote "$i".

$ touch a

$ touch b\ c

$ for i in *; do ls "$i"; done;

Read more »

12

Tip #92   Sort a file by line length

Sort a file by line length:

Read more »

11

Tip #93   Subtract one file from another

Subtract a small file from a bigger file.

Read more »

5

Tip #94   Overwrite a file with zeroes

Overwrites a file with zeroes.
Put in in your .bashrc or .bash_profile in Mac OS X.

Read more »

13

Tip #95   Bash terminal size

Q: If I resize my xterm while another program is running, why doesn't bash notice the change?
http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)

Bash won't get SIGWINCH if another process is in the foreground.
Enable checkwinsize so that bash will check the terminal size when
it regains control.

Put this in your bash config somewhere (e.g. Gentoo has it in /etc/bash/bashrc):

Read more »