Optargs????


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Optargs????
# 1  
Old 01-18-2008
Optargs????

Hi

I am sorry if my query is too simple ......

Can anybody explain the usage of optargs in shell script with options having arguments associated with them.


Thanks in advance !!!
# 2  
Old 01-18-2008
have you looked at the man page for getopt or the shell documentation for getopts?
# 3  
Old 01-18-2008
Actually i am not having any unix console right now. Otherwise i could have checked that.
PLease help me with an example !!!

Thanks

Quote:
Originally Posted by frank_rizzo
have you looked at the man page for getopt or the shell documentation for getopts?
# 4  
Old 01-18-2008
I might help you out. Since I am out of town(family issues), I dont have my references, but when I come back next Thursday, I would give you a hit.
# 5  
Old 01-18-2008
Quote:
Originally Posted by skyineyes
Actually i am not having any unix console right now. Otherwise i could have checked that.
PLease help me with an example !!!

Thanks
google is your friend. there is a ton of documentation out there on this.
search for "shell getopt example" and you will have hours of fun reading.
# 6  
Old 01-18-2008
Thanks danny !!!

I would appreciate if any sort of information can come right now from anybody !!!

Quote:
Originally Posted by dannypaintboy
I might help you out. Since I am out of town(family issues), I dont have my references, but when I come back next Thursday, I would give you a hit.
# 7  
Old 01-18-2008
google + search "getopts"
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

optargs processing

Hello i'm writing some analyzing script and i'm giving to my program these parameters, for example: ./procinfo -r tmpfile sh -c "cat tmpfile" where -r is proccessed in getopts and it takes an argument by OPTARG.. The thing is I need to save this part to some variable: sh -c "cat tmpfile"... (4 Replies)
Discussion started by: midin
4 Replies
Login or Register to Ask a Question