Bash Cookbook Author (bashcookbook)
-
Best of 2010! We made the top 25 O'Reilly e-books for 2010! Ad: Get 60% off those titles today only w/code DDT25 at http://oreil.ly/hQxKRR
Wednesday, 19-Jan-11 18:16:57 UTC from web -
Delete a function definition with the "unset" builtin, but add the "-f" option. Example: if you have function "myfunc" use: unset -f myfunc
Tuesday, 18-Jan-11 18:43:27 UTC from web -
See all the functions defined in your environment with "declare -f" or "typeset -f" . Specify a function name to see just that function.
Monday, 17-Jan-11 18:58:23 UTC from web -
Use !cmd to repeat the last command beginning with "cmd" or just look at what it would be with !cmd:p
Monday, 29-Nov-10 18:15:03 UTC from web -
Keep your history smaller by omitting adjacent duplicate entries; just set HISTIGNORE="&" or HISTCONTROL="ignoredups"
Wednesday, 24-Nov-10 18:44:30 UTC from web -
Use "history -s some command" to add some command to the end of your history list without actually executing it.
Wednesday, 10-Nov-10 17:55:27 UTC from web -
'single quotes' give you no substitutions but used inside "dbl quotes" they have no special meaning so you can do: echo "MYVAR='$MYVAR'"
Monday, 25-Oct-10 17:20:31 UTC from web -
Fill an array variable from a line of text parsed into white-space-separated words with: read -a VAR then echo ${VAR[2]} for the 3rd word.
Friday, 22-Oct-10 18:09:15 UTC from web -
A : command is a builtin that does nothing but evaluate its arguments. It's a handy way to "declare" defaults, like : ${MYVAR:=default}
Monday, 18-Oct-10 16:57:06 UTC from web -
Talk at SVLUG went well - now back to bash: if VAR holds "host:/some/path" then use ${VAR%%:*} to get just the host name.
Friday, 08-Oct-10 19:34:13 UTC from web -
I'm in San Jose today - talking to the SVLUG tonight 7-9pm. Come and say "hi" and let me know you subscribe via identi.ca . - Carl svlug.org
Wednesday, 06-Oct-10 21:50:42 UTC from web -
Will you be there Wed. 7pm at SVLUG? Bring your copy of bash Cookbook I'll stay around after and sign yours! Carl www.svlug.org/meetings.php
Monday, 04-Oct-10 18:13:13 UTC from web -
Want to know all your shell variables beginning with S ? Type: echo ${!S*} ; for v in "${!S@}" ; do echo $v = ${!v} ; done
Monday, 04-Oct-10 18:12:32 UTC from web -
Come meet a #bashcookbook author - Live, In Person - at Silicon Valley Linux User Group this Wed. 7pm http://www.svlug.org/meetings.php
Friday, 01-Oct-10 18:22:44 UTC from web -
Ever want to internationalize your shell scripts? check out this Linux Journal article: http://tinyurl.com/bash-i18n
Tuesday, 28-Sep-10 20:59:01 UTC from web -
Change your directory stack by simple assignment, e.g. DIRSTACK[2]=/new/loc but you need pushd or popd to add or remove stack entries.
Wednesday, 22-Sep-10 17:47:44 UTC from web -
Do you use "dirs", "pushd" and "popd"? Do you know DIRSTACK is a bash array variable with each of the stack's directory names as an element?
Friday, 17-Sep-10 17:43:48 UTC from web -
Clear out that pile of directories from all your pushd cmds, leaving you in the current directory but w/an empty stack; type: dirs -c
Thursday, 16-Sep-10 01:51:52 UTC from web -
Get bash Cookbook! Today only #Ebook Deal: bashcookbook or any of 45 others (DRM-free) Only $9.99 ea. Use code: DDCCC http://oreil.ly/dmohlH
Wednesday, 15-Sep-10 18:23:33 UTC from web -
If you use pushd and have a stack of directories, use ~2 for the 2nd dir from the top (3rd in the stack) as in: cp myfile ~2
Friday, 23-Jul-10 18:03:07 UTC from web