Typeset


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Typeset
# 1  
Old 01-18-2010
Typeset

Hi,
Can any one please explain me the use of 'typeset' in shell scripting?
I donot under stand the use and advantages of using typeset.
In one of our script, it is written like
Code:
typeset VERBOSE NO_UPDATE
typeset LOAD_SYBASE_TABLES

I donot understand what actually these lines do.
As per my understanding to set variable, we can use set or export.

Can any one please explain elaborately?

Thanks,
Siba S Nayak
# 2  
Old 01-18-2010
We use typeset to declare variables and/or give them attributes. If no names are given then display the values of variables. The -p option will display the attributes and values of each name. When -p is used, additional options are ignored. The -F option inhibits the display of function definitions; only the function name and attributes are printed. The -F option implies -f. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes.

You can check man pages for details
# 3  
Old 01-18-2010
Hi Amit,
Thanks a lot. How typeset is different from set or export, which also used to set the variables?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pipe in typeset

I wanted to understand the meaning of pipe in typset declaration, I understood the meaning but wanted to know the concept. Sample declaration: typeset -r A='ab | bc | cd1' (1 Reply)
Discussion started by: nixhead
1 Replies

2. Shell Programming and Scripting

Typeset

I don't have man typeset entry in unix. what is the use of typeset command and can you give some examples for that. (1 Reply)
Discussion started by: ramkumar15
1 Replies

3. UNIX for Dummies Questions & Answers

Typeset in HP-UX and Linux

typeset -u xname1=$mname1 is working fine in HP-UX. But it throwing below error in Linux: line 40: typeset: -u: invalid option typeset: usage: typeset name . Please suggest. Thanks, Ambar (5 Replies)
Discussion started by: ambarginni
5 Replies

4. Shell Programming and Scripting

Why use typeset?

Hi, All the scripts we have here use typeset instead of normal variables. They don't have any parameters, they just get declared at the beginning of the scripts like this: typeset var1 var2 var3Could anyone tell me why this is done? I don't see the advantage in this over using normal variables. (1 Reply)
Discussion started by: Subbeh
1 Replies

5. Solaris

typeset: not found

I am trying to run a script in Solaris 10 in which it it giving error typeset: not found (I am trying to use typeset -i ) where the shell is $ echo $SHELL /usr/bin/sh But when i do bash it is running fine. can any one tell me how i can use the same with out doing bash. Thanks in... (3 Replies)
Discussion started by: kirpond
3 Replies

6. UNIX and Linux Applications

typeset-r

Hi All , Can any one help me the meaning of typeset -r Thanks, venkat (1 Reply)
Discussion started by: venkatakotiy
1 Replies

7. Shell Programming and Scripting

Typeset

Hi, Could any one please explain about typeset or share any link from where i can study about typeset i.e how to use it, how to define it.. etc? Thanks- Yogi (3 Replies)
Discussion started by: bisla.yogender
3 Replies

8. Shell Programming and Scripting

typeset

Can anyone show me a simple practical usage of typeset. (1 Reply)
Discussion started by: balaji_prk
1 Replies

9. Shell Programming and Scripting

typeset -f ???

I have found this command *typeset* and the option * -f *, which should provide me the list of all the currently defined functions. Is there any possibility of specifying the file in which this command to search ? (1 Reply)
Discussion started by: xinfinity
1 Replies

10. UNIX for Dummies Questions & Answers

TYPESET use

Hi all, I have problem understanding shell script.Written that $bindir/put_load.ksh ; typeset RV= $? I dont have any other document about script. How can i find that $bindir is exist or not what is the content of that, i am working on new box . how can i search that in old box what... (4 Replies)
Discussion started by: sam71
4 Replies
Login or Register to Ask a Question