bash -- Industry guru Dave Taylor answers questions about a wide variety of technical topics, including HTML, online advertising, Cascading Style Sheets, Web design, Unix, Linux, search engine optimization, Mac OS X, shell script programming and Microsoft Windows.

"bash" Help and Information



How do I set my Terminal / shell PS1 prompt?

I have Mac OS X 10.5.8. When I try to change my unix shell prompt by putting the line:   export PS1='mac> ' into my .bash_profile, the prompt is changed but the cursor is in the first column (over the "m" of my prompt) and any typing overwrites the prompt....

Continue reading about How do I set my Terminal / shell PS1 prompt?

How do I step through numeric values in a shell script?

Please, gimme a advice how to correctly use loop "for i in `seq 1 10`" for Mac OS X, echo $SHELL->/bin/bash, because when I write simple strip: for i in `seq 1 10`;do echo $i;done it outputs -bash: seq: command not found....

Continue reading about How do I step through numeric values in a shell script?

How do I change my PS1 command prompt in Bash?

I have read about 15 chapters of your book (Teach Yourself UNIX in 24 Hours) so far. We are using vi. On the PS1 command, how do I see what is in it so I can add to it and not change what is already there? We are using bash. What I see now is: ctdaywbsdv:/u/gwilki$When I enter ‘echo $PS1’ I get: $ \[\e[0m\]How do I keep the above and add the histcmd option? What...

Continue reading about How do I change my PS1 command prompt in Bash?

How do I get "vi" shell edit mode in Mac OS X Terminal?

I just finished Learning Unix for Mac OS X Tiger, and think it is an excellent little resource. I'm recently out of school, a school where we weren't taught anything about Unix, just enough to get by. I started work with the data converter team at Agilent labs, and have been able to glean quite a bit off of them (considering many of them were either directly or indirectly responsible for writing many of them...

Continue reading about How do I get "vi" shell edit mode in Mac OS X Terminal?

How can I count executable binaries on my Linux box?

I've been looking at your script to count executable binaries in the book Wicked Cool Shell Scripts and I think that there's a problem in the script. Specifically, what happens if I have a directory in my PATH more than once?...

Continue reading about How can I count executable binaries on my Linux box?


Advanced Search :: Ask Dave Taylor!


Match case   Search using regular expressions
Search: Entries Comments Both
Sort By:
Sort Order:
Search entries from:
Maximum results shown:


Need Help? Ask Dave Taylor!
Search