1751697 Members
5082 Online
108781 Solutions
New Discussion юеВ

Scripting Question

 
Smucker
Regular Advisor

Scripting Question

I am new to UNIX and have a scripting question.

I am somewhat confused on the use ans when to use the following () [] {} "" '' ``

I know {} is used for funtions
I know [] is used for test command
is the any clear document or reference that will explain all thier different uses?
7 REPLIES 7
Stanimir
Trusted Contributor

Re: Scripting Question


Hi !

Simply find a relevant section in the attachment!

Regards.
Chris Vail
Honored Contributor

Re: Scripting Question

This is a major area of knowledge which really goes outside the realm of a forum question. Instead, I recommend _Unix Shell Programming_, Stephen G. Kochan and Patrick H. Wood, by Hayden books. They cover this issue in depth. My copy is ancient--I've literally worn the covers off it. But they have a more recent edition than mine. If you can get through the first 5 chapters or so, you'll be a Unix ace very quickly.

Chris
Smucker
Regular Advisor

Re: Scripting Question

thanks for the input I figured it would be a somewhat complex answer. I will read the tutorials mentioned.

Thanks
Stuart Abramson
Trusted Contributor

Re: Scripting Question

"Korn Shell Programming Tuturial"

by Barry Rosenberg

published by Addison Wesley. ISBN 020156324X.

Also, ancient.

I use:

{} for command calls:
HOST=${ hostname }

but, also for arrays with variable dimensions:

integer array[3]=${array[2]}
pvcreate -f /dev/rdsk/${DISK[$I]}

etc. Likewise the other marks. So reading a book is still a good idea.
Bharat Katkar
Honored Contributor

Re: Scripting Question

Hi SMucker,
This one is for free.. :)

http://www.hk8.org/old_web/unix/ksh/index.htm
Regards,
You need to know a lot to actually know how little you know
Ranjith_5
Honored Contributor

Re: Scripting Question

Hi,

Attached the doc file containing the table of meta characters and their meanings.

You can see the info in the following link also @ table1.5-1

http://sayle.net/book/basics.htm


regards,
Syam
Ranjith_5
Honored Contributor

Re: Scripting Question

Hi,

Attached the doc file containing the table of meta characters and their meanings.

You can see the info in the following link also @ table1.5-1

http://sayle.net/book/basics.htm


regards,
Syam