Trouble setting up flag ( getopt) for my script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Trouble setting up flag ( getopt) for my script
# 1  
Old 07-26-2012
Trouble setting up flag ( getopt) for my script

Code:
do
    case $option in
        d ) CHEC=true;;
        # more option processing can go here
        \? ) echo "Unknown option: -$OPTARG"
        :  ) echo "Missing option argument for -$OPTARG";;
        *  ) echo "Unimplimented option: -$OPTARG";;
    esac
done
shift $(($OPTIND - 1))


Last edited by Franklin52; 07-28-2012 at 03:20 PM.. Reason: Please use code tags for data and code samples, thank you
# 2  
Old 07-26-2012
Summary says, "Trouble setting up". What have you tried and where are you stuck?
If you're looking for tutorials on getopts, there're plenty of posts available right in this forum.
# 3  
Old 07-26-2012
added to my question

Last edited by upenmishra; 07-26-2012 at 02:50 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getopt eval set parameters not happening when the script is called through an application!

Hi, There is an Informatica tool through which unix scripts can be called. Now the requirement in my project is that a parent script calls a child script but this parent script has to be called through the Informatica tool. In Parent script I'm using TEMP=`getopt -o x:y: -l area:,volume:... (1 Reply)
Discussion started by: Panna
1 Replies

2. Shell Programming and Scripting

Trouble with setting a variable with vastool

Hi I have this command that when put on the command line it returns the output the way I want it. /opt/quest/bin/vastool list -a groups | grep testdev_li | grep dev | awk -F"" 'NF>2{print $2}' | cut -c2- | tr '\n' '|' The output of this is ... (2 Replies)
Discussion started by: ajetangay
2 Replies

3. Proxy Server

Samba on AIX, issues setting read-only flag on files?

Hello, I am having issues setting the "read-only" flag via Windows Explorer on my AIX Samba share... I have on my AIX 7.1 system installed Samba 3.6.24 and configured, joined to our Windows domain successfully. The samba binaries I got from perzl.org/aix In my smb.conf I have... ... (1 Reply)
Discussion started by: c3rb3rus
1 Replies

4. Linux

Trouble setting up basic user authentication on apache2 web server

Hey guys! So I decided to set up some basic user authentication on my apache2 server, and I am running into some problems. I followed the documentation provided by apache on their website, but I cant create the password file for some reason. I did a little trouble shooting myself, and found... (40 Replies)
Discussion started by: LinuxIntern445
40 Replies

5. UNIX for Dummies Questions & Answers

Trouble setting up a shared folder

I'm trying to set up a folder in my home directory that will be shared with another user but for some reason it is not working this is what I've done, I have tried two different ways using ACL's and chown/chgrp etc I set up a group called say: sharedgroup and added both my user (john) and fred... (3 Replies)
Discussion started by: 14952john
3 Replies

6. Shell Programming and Scripting

setting up a flag inside awk

Hi unix gurus.... i need to set a flag inside awk. i tried many methods for that but couldn't succeed :( like echo "flag= " $flag echo "flag= " ${flag} and so...but not able to show the flag. help me out. i'm using a if condition inside awk... help me out with correct syntax to set a... (7 Replies)
Discussion started by: sukhdip
7 Replies

7. UNIX for Dummies Questions & Answers

Trouble Setting Up Sun Ultra 10 - Displaying Garbage

Hello there, I am new to this forum as well as to the UNIX world. Recently graduated with a degree in Computing and just started learning UNIX & bought 3 Sun Ultra 10 Servers. I was trying to set the Servers up so I can use them; the Servers don't have a VGA card. My laptop, which I would be... (6 Replies)
Discussion started by: frhan2u
6 Replies

8. Ubuntu

Trouble setting up Java classpath

Saw an error while setting up an application called i2phex: # ./run.sh java.lang.RuntimeException: Failed to initialize phex.net.repres.i2p.I2PPresentationManager at phex.common.ManagerController.initializeManagers(ManagerController.java:78) at phex.Main.main(Main.java:161)After... (0 Replies)
Discussion started by: Israel213
0 Replies

9. IP Networking

Trouble setting up a static IP on NetGear DGN1000

I have been trying to setup a static ip, however everytime I do so my internet disconnects and won't connect untill I switch back to dynamic. My router is a NetGear DGN1000 and I'm using it wired. Could anyone help? (0 Replies)
Discussion started by: zomigosh
0 Replies
Login or Register to Ask a Question