Profile
Achievement
cczona's Recent Bash Snippets
- All /
« Prev 1 Next »
From the Pickaxe, 4th edition, p. 352:
A rescue clause with no parameter is treated as if it had a parameter of StandardError. This means that some lower-level exceptions will not be caught by a parameterless rescue class. If you want to rescue ev...
1
607
posted 12 years ago by cczona
See also http://www.gnu.org/software/bash/manual/bashref.html#Bindable-Readline-Commands for the standard bindings and more detailed explanation of what they do.
0
721
posted 12 years ago by cczona
[See also: http://snipplr.com/view/12048]
Oops, didn't mean to commit that? Undo it easily:
0
563
posted 13 years ago by cczona
Examples borrowed from http://ubuntuforums.org/showthread.php?t=966877 (comment 3)
0
611
posted 13 years ago by cczona
Suppose you created a script chart.rb in /home/foo/ruby/mylib direcory. Now, you want to use this in the app.rb located in /home/foo/ruby/scripts. In ~/.bash_profile:
0
517
posted 15 years ago by cczona
Changing default settings
The defaults for the ssh-related commands can be altered for each account in a configuration file ~/.ssh/config (there is also a system-wide file, usually /etc/ssh/ssh_config). Each entry starts with a Host keyword. You c...
0
546
posted 15 years ago by cczona
Check out the bash command 'shopt -s cdable_vars' From the man bash page: If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
0
527
posted 15 years ago by cczona
(EDITED: Originally I had this snip using 'cat /proc/version'. But have since replaced it with a more reliable -- and specific -- method)
If you need still more info (or are on a BSD), see 'uname', 'dpkg-architecture'
1
513
posted 15 years ago by cczona
If Ubuntu Server fails to resolve hostnames or find a network connection via Parallels 3 bridged networking, it may be attempting to use the wrong network interface.
0
546
posted 15 years ago by cczona
Forces a recalcitrant port to install by *uninstalling* it completely first
0
371
posted 16 years ago by cczona
//for options available, see:
http://www.ss64.com/bash/shopt.html
1
653
posted 16 years ago by cczona
When Apache under OS X throws 'Forbidden' errors on files under the ~/Sites path, and the error log report 'Permission denied: access to /somefile/blah failed because search permissions are missing on a component of the path', check a missing Other E...
1
705
posted 16 years ago by cczona
To find out how much swap you are using at any given time.
If there's more than 1 swapfile you could benefit from more RAM.
0
498
posted 16 years ago by cczona