Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Pages: 1 2 3 4 
Send Topic Print
UNIX Shell scripting (Read 58891 times)
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #15 - Jun 13th, 2009 at 8:10pm
 
Nope, sorry.  I used to have one but I just checked and the link is dead.  Page 8 of my guide has a few of the most basic commands.  Page 1 has links to tldp, Linux.org, and Linix-tutorial, and you can find some good stuff there.  Otherwise, google.

The man pages will have all the flags of the commands, so once you find the right command, you are on your way.
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #16 - Jun 13th, 2009 at 8:14pm
 
Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:06pm:
if i run my setUp.pl script from /cgi-bin directory, which sets all permissions for yabb forum installation files, can i just navigate to /cgi-bin, and enter setUp.pl and hit enter, or do i have to first call the perl prgm by entering

It depends on if your system knows that it is a Perl file.  If the first line of the script is something like "#!/usr/bin/perl" it should work.  If not, you will have to add that line or use "perl setUp.pl".  The other thing to check is make sure the script permissions are set to executable.  "ls -l setUp.pl" will show you the permissions.

MrMagoo wrote on Jun 13th, 2009 at 7:25pm:
I think your key mappings for your keyboard are set to something international.  Maybe French. 

Click on System->Administration->Languages and make sure it is set to US English.  Check for the same thing in System->Preferences->Keyboard->Layouts

Any luck?
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #17 - Jun 13th, 2009 at 8:14pm
 
ls -lax is same as ls -l -a -x .. right?

what about ls -l-a-x with no spaces between options

is that syntax correct?

does order matter?

how about ls -xal

is this functionally same as ls -lax?

what about double dash?

such as ls --l or ls --lax or ls -l--ax  ??
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #18 - Jun 13th, 2009 at 8:16pm
 
MrMagoo wrote on Jun 13th, 2009 at 8:10pm:
The man pages will have all the flags of the commands,

not familiar with term > flag.
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #19 - Jun 13th, 2009 at 8:19pm
 
MrMagoo wrote on Jun 13th, 2009 at 8:14pm:
The other thing to check is make sure the script permissions are set to executable.

what do you use for executable? 755?

when not using i set to 000
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #20 - Jun 13th, 2009 at 8:25pm
 
for keyboard model, i am set to generic 105 intl PC. Not intuitively obvious what it should be set to.

layout is usa alternative international

advice?

so many options.
 
WWW  
IP Logged
 

MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #21 - Jun 13th, 2009 at 8:43pm
 
Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:25pm:
layout is usa alternative international

Set it to "US English".
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #22 - Jun 13th, 2009 at 8:52pm
 
Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:16pm:
not familiar with term > flag.


MrMagoo wrote on Jun 13th, 2009 at 7:25pm:
Most of the time the words switches, flags, and options all mean the same thing in this context.



Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:19pm:
what do you use for executable? 755?

when not using i set to 000

Ya, 755 will work.  Anything that starts with 7.  744 or even 700 would be fine.

000 is a very odd permission, but I guess it does ensure it doesn't get executed.


Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:14pm:
ls -lax is same as ls -l -a -x .. right?

Yes.


Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:14pm:
does order matter?

Usually, no.  Sometimes, if there is more info after the flag, then it can matter.  For example, "tar -xzf filename" works, but tar -zfx filename" doesn't because the 'filename' has to be next to the 'f'.


Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:14pm:
what about ls -l-a-x with no spaces between options

That won't work.


Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 8:14pm:
what about double dash?

such as ls --l or ls --lax or ls -l--ax  ??

That won't work either.  The '--' is usually reserved for longer options or when the option name contains a '-' in it.  For example: "du -h --max-depth=1"
 
WWW  
IP Logged
 
Spanky
Radmeister
**
Offline


Rad's non-Admin Test profile
in Seamonkey

Posts: 73
Same as Rad


Back to top
Re: UNIX Shell scripting
Reply #23 - Jun 13th, 2009 at 9:34pm
 
Back from dinner. Chicken & shrooms & rice in coconut milk gravy .. yummy.

Anyway, sorry to make you post same info twice. I think we musta both been posting at same time, cuz I missed one of your posts on page 1.

Will go back & make sure I got it all.
 
WWW  
IP Logged
 
Rad
Radministrator
*****
Offline


Sufferin' succotash

Posts: 4090
Newport Beach, California


Back to top
Re: UNIX Shell scripting
Reply #24 - Jun 13th, 2009 at 9:36pm
 
BTW - here's mail from Nigel. I miss Nigel.

Quote:
Just some other things; you wrote on the forums that:

* Seems that learning the UNIX/Linux shell is really about learning the commands, and what those commands do, and the various switches available to each command .. no?

The answer to that is an emphatic *no*. The UNIX shell is a pretty powerful language in its own right, and you can do more with it than most people realise - frankly, the reason so many people seem to get so excited about Perl is they tend to learn it before the shell language, but actually Perl is a conceptual evolution from the shell language with none of the conceptual integrity (which doesn't make it not useful, but it's not worth learning for its own sake).

The shell language processes strings, by running a few simple substitution rules in order - which means that in terms of internal simplicity, it's actually quite like Scheme. Learning how to use the shell language well is a similar process to learning Scheme - because it has only a few facilities, learning it is mostly about getting used to the creative application of a few general problem-solving principles that serve you in good stead everywhere.

Now, learning the commands does matter in a practical sense for being familiar with UNIX generally, but that's nothing really to do with learning the shell at all. It's a much better and more powerful tool than that.

* do you have a good online link to list of all major commands and their respective options?

Everything in UNIX was standardised - proper, real agreed standards done by serious people - long ago before Linux started. It began with POSIX and AT&T took it even further by supporting a thing called the Single UNIX Specification which all the UNIX and UNIX-like operating systems could use (except for Linux which never followed it much, although that finally changed around 2000 when businesses started getting more involved and it began to be steered more by grown-ups).

The gold standard is the Single UNIX Specification and everything important is there; almost everything you need for most purposes is in Version 2, which you don't need to register to access.
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #25 - Jun 13th, 2009 at 9:37pm
 
Spanky wrote on Jun 13th, 2009 at 9:34pm:
I think we musta both been posting at same time, cuz I missed one of you posts on page 1.

I had a feeling that happened.
 
WWW  
IP Logged
 

Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #26 - Jun 13th, 2009 at 9:59pm
 
RE the keyboard setting, I set to USA English, but still getting beep at didnt apostrophe.

Maybe I need to restart?

Re Keyboard model, I see nothing obvious to select. I counted the keys on my (Gateway) laptop at 86. The lowest number in settings is 101.

Do you have any insight there?

Do I need to Apply System-wide?
 
WWW  
IP Logged
 
MrMagoo
Übermensch
*****
Offline


Resident Linux Guru

Posts: 1026
Phoenix, AZ (USA)


Back to top
Re: UNIX Shell scripting
Reply #27 - Jun 13th, 2009 at 10:13pm
 
Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 9:59pm:
Maybe I need to restart?

Probably.

Rad.in.UbuntuVM wrote on Jun 13th, 2009 at 9:59pm:
Re Keyboard model, I see nothing obvious to select. I counted the keys on my (Gateway) laptop at 86. The lowest number in settings is 101.

The "Generic Intel' one you said was selected should be fine.
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #28 - Jun 13th, 2009 at 10:58pm
 
That wasnt Intel. It was Intl .. as in International.
 
WWW  
IP Logged
 
Rad.in.UbuntuVM
Radmeister
**
Offline


Rad in Ubuntu 9.04 Jaunty
Virtual Machine

Posts: 92


Back to top
Re: UNIX Shell scripting
Reply #29 - Jun 13th, 2009 at 11:03pm
 
Restarted. Test > didn't. Hey it worked! No more beepage. Cool.
 
WWW  
IP Logged
 
Pages: 1 2 3 4 
Send Topic Print