Monday, May 21, 2012

unix - Using getopts in bash shell script to get long and short command line options - Stack Overflow

unix - Using getopts in bash shell script to get long and short command line options - Stack Overflow:


I wish to have long and short forms of command line options invoked using my shell script. I know that getopts can be used, but like in Perl, I have not been able to do the same with shell.
Any ideas on how this can be done, so that i can use options like:
./shell.sh --copyfile abc.pl /tmp/
./shell.sh -c abc.pl /tmp/
In the above, both the commands mean the same thing to my shell, but using, getopts, I have not been able to implement these?
link|improve this question

feedback
The bash getopts builtin does not support long option names with the double-dash prefix. It only supports single-character options.
There is a shell tool getopt which is another program, not a bash builtin. The GNU implementation ofgetopt (e.g. on Linux) supports parsing long options.
But the BSD implementation of getopt (e.g. on Mac OS X) does not.
link|improve this answer

'via Blog this'

Sunday, May 20, 2012

solar eclipse AND (colorado OR utah OR wyoming OR oregon OR washington) - Google Search

solar eclipse AND (colorado OR utah OR wyoming OR oregon OR washington) - Google Search:


Page 3


'via Blog this'

Slooh Space Camera Snaps

Slooh Space Camera Snaps:


Slooh Space Camera Snaps

Celestial shots from our live shows on Slooh homepage.
1540 followers , 40 pins
Almost done #annular #solar!
Almost done #annular#solar!
6 likes    3 repins   
Clouds coming in - near horizon - eclipse is almost over  - #annular #solar #astronomy
Clouds coming in - near horizon - eclipse is almost over - #annular#solar#astronomy
2 likes    4 repins   
California #annular eclipse - clouds coming in - post ring of fire. #solar #astronomy
California #annulareclipse - clouds coming in - post ring of fire. #solar#astronomy
10 likes    10 repins   
Post Ring of Fire - California feed #annular #solar
Post Ring of Fire - California feed#annular#solar
5 likes    12 repins   
New Mexico feed Ring of Fire #annular #solar www.slooh.com
New Mexico feed Ring of Fire#annular#solarwww.slooh.com
13 likes    20 repins   
Ring of fire from New Mexico! #annular #solar #astronomy www.slooh.com
Ring of fire from New Mexico!#annular#solar#astronomywww.slooh.com
57 likes    3 comments    130 repins   
Profile picture of Dave LaForest
Dave LaForest Very cool
Profile picture of Laurie Montag
Laurie Montag Beautiful!
Profile picture of Rochelle Soriano
Rochelle Soriano Awesome!!
New Mexico feed from University of New Mexico - #solar #annular - almost ring of fire
New Mexico feed from University of New Mexico - #solar#annular- almost ring of fire
11 likes    20 repins   
Slooh - Ring of Fire - #annular #solar #astronomy
Slooh - Ring of Fire - #annular#solar#astronomy
21 likes    5 comments    71 repins   
Profile picture of Ann Harwood
Ann Harwood California 6:31 pm May 20,2012
Profile picture of Kathy Ladd Wilson-Gray
Kathy Ladd Wilson-Graywhat a great site!!
Profile picture of Mary I-L
Mary I-L tht was cool 2 watch ty
Profile picture of Brenda J Willoughby
Brenda J WilloughbyAwesome sight. Glad I found you guys!
Profile picture of Pat Lee
Pat Lee Great sight
Ring of fire!! #solar #annular
Ring of fire!! #solar#annular
22 likes    1 comment    34 repins   
Profile picture of Garth Yorko
Garth Yorko Ring of fire, thanks to syzygy
Ring of Fire - almost here! #solar#annular#astronomywww.slooh.com
6 likes    11 repins