bash shell tips     
Bash shell
Redirect both stderr and stdout to somewhere (/dev/null perhaps?)
[command] > /dev/null 2>&1

If you hit ctrl-s in a terminal, it will not display anything you type.  
To get the terminal back to normal, hit ctrl-q

command line sequence:
for i in `seq -w 1 10`; do echo $i; done

to filter out text in a list:
ls * | grep -v 'ignorethis\|andthis\|thistoo'

To get color in the terminal add the following to your environment 
(this was in FreeBSD)
alias ls="ls -G"
export TERM=xterm-color

To avoid having duplicates in your command history, add the following to a 
bash configuration file:
export HISTIGNORE=\&
That way it will only store one copy of the command.

If you get error messages like "./script 16: unbalanced [" when you're using an 
if statement in your shell script, make sure there is a space after the [ 
and before the ] in the conditional.

To execute multiple commands with the find -exec option, use escaped ampersands:
find . -name '*.txt' -exec ls -l {} \&\& touch {} \;

Updated Nov 18, 2006

# of readers
home
about me
blog archives
- docs
acroread
firefox
java
linux
mysql
perl
rpm
shell
vim
win

entertainment
experiences
funny lists
humor
intellectual
interests
mefi
music
opinions
photos
web designs
tools
webmaster help

Sign up
Enter your e-mail address below to be notified of new posts:






Search

  


Random quote
(View all quotes)
"Start the day with a smile. After that you can be your nasty old self again."










Licensed under Creative Commons
(?) Choose theme:  X X X X X X


Loaded in 0.0088 seconds