unix -- 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.

"unix" Help and Information



What version of Linux am I running?

I have a Virtual Private Server or a dedicated server running Linux, but I'm not sure which version of Linux (Fedora, CentOS, Debian, etc.) the server is running. How do I find out?...

Continue reading about What version of Linux am I running?

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 can I convert map addresses into latitude longitude?

I'm trying to write a shell script that will accept a street address and output the latitude and longitude of that address, for geocache purposes. How can I do that?...

Continue reading about How can I convert map addresses into latitude longitude?

How do I install Ubuntu Linux on a Netbook?

I just bought a slick ASUS Eee PC netbook, model 1000HA, and want to configure it to work with both Microsoft Windows XP, which is already installed, and Ubuntu or some other flavor of Linux. How can I do that without having to reinstall WinXP?...

Continue reading about How do I install Ubuntu Linux on a Netbook?

How do I install Apple Developer Tools on my Mac?

I seem to recall a long time ago that when you installed Mac OS X you also got a bunch of cool Unix command line developer tools, including a C compiler, debugging tools and much more. I'm taking a C programming class at the local community college and would like to install these tools, but have no idea where they are any more. Help?...

Continue reading about How do I install Apple Developer Tools on my Mac?

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?

What does the $( ) notation mean in a Bash script?

On page 329 (Hour 16) of your book Teach Yourself Unix in 24 Hours is the example: value=3 ; string="my horse Horace"test $value test `wc –l filename` -ge 10000 If I try this with this code: #!/bin/sh/value=3;string="my horse Horace"test $value test `wc -l ched4` -ge 10000 I get:- syntax error at line 3: `(' unexpected Are you able to quickly explain what the line test $value...

Continue reading about What does the $( ) notation mean in a Bash 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 my shell script test to see if it's already running?

I have a script that does an ftp from a SCO UNIX server to windows server to get files from the windows server. The script is set in the cron to run every xx minutes. Sometimes the script will hang and leave a process running. This can bog down the UNIX server. I want to be able to do two things. 1. I want to make sure that the script doesn't hang - so it...

Continue reading about How can my shell script test to see if it's already running?

String comparisons don't work in shell scripts?

I'm a bit baffled. I'm trying to compare string variables in a shell script to figure out if one value is lexically less (that is, would appear earlier in the dictionary) than another, but it doesn't seem to work at all? Help!...

Continue reading about String comparisons don't work in shell scripts?

How can I run an app if another app is running?

I need to run a Unix application if a different application is running, from within a shell script. How do I do this?...

Continue reading about How can I run an app if another app is running?


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