Checking which arguments are supplied


 
Thread Tools Search this Thread
Top Forums Programming Checking which arguments are supplied
# 1  
Old 12-11-2012
Checking which arguments are supplied

I have written this C++ program and I am using getopt_long
# 2  
Old 12-11-2012
I see no program?
# 3  
Old 12-11-2012
Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Function needs to be called based on its first character in a supplied string

Hi All, I want to write a bash script in which a function needs to be called based on its first character in a supplied string. eg function "j" should be called when "jab" or "jgh" or "j" .... etc is hit. I have used complete -F in below script, however here function is invoked... (1 Reply)
Discussion started by: temp.sha
1 Replies

2. Shell Programming and Scripting

Changing information supplied when running file

In unix systems I can call `file` to return me the file type. file cel.vik $ cel.vik: ASCII text How can I append additional information when I create a file such that when I call `file` it returns me that additional information. (2 Replies)
Discussion started by: kristinu
2 Replies

3. Shell Programming and Scripting

Redirecting/Capturing inputs supplied in interactive script

Hello Is it possible to redirect standard input into a file in an interactive script like we do for standard out and input using &2 and &1. Enter source : hi Enter destination : bye In the log i can see like this when I am using script.sh 2>&1 | tee file Enter source : Enter... (3 Replies)
Discussion started by: ningy
3 Replies

4. Shell Programming and Scripting

Need to get all the records from a log file greater than timestamp supplied.

I have a log file which has records with hung thread information/error I need to find out hung thread from log file greater than timestamp supplied. 00000026 ThreadMonitor W WSVR0605W: Thread "WebContainer : 1" (00000027) has been active for 701879 milliseconds and may be hung. There is/are... (6 Replies)
Discussion started by: megh
6 Replies

5. Programming

Checking which arguments are supplied

I have written this C++ program and I am using getopt_long and want to chech when the user supplies the arguments so that I can put a default or otherwise. Currently I am using hasargv or Pc.get_string("key",s), Pc.get_real("key",s), etc to detect whether the user supplied a value. For... (3 Replies)
Discussion started by: kristinu
3 Replies

6. Programming

Checking which arguments are supplied

I have written this C++ program and I am using getopt_long and (0 Replies)
Discussion started by: kristinu
0 Replies

7. UNIX for Dummies Questions & Answers

Delete from supplied list of files

Hi, I have a file that contains >4000 inode numbers. Each inode number is on separate row. I'd like to delete all this files. Any idea how could I do it? Thank you. Andrej (3 Replies)
Discussion started by: andrejm
3 Replies

8. Shell Programming and Scripting

Checking arguments

I shoe here the start of a csh script I have written. I am trying to write some code to check the arguments and if the arguments don't match the tags, I will abort and display an error. For example using ./script.csh -r=10/20.30/40 -xyz=2/3/4 will give an error as the -xyz tag doea not... (24 Replies)
Discussion started by: kristinu
24 Replies

9. Homework & Coursework Questions

checking for number of arguments.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Your script must check for the correct number of arguments (one argument). If somebody tries to invoke the... (1 Reply)
Discussion started by: brooksie91
1 Replies

10. Shell Programming and Scripting

unix question: user supplied input for 'alias'

I have a program to scan the log files and I want to pipe the output to 'less'. I want to create an alias such that following are equivalent scanlog chunky.lst = /udd/n2man/utils/scanlog chunky.lst|less where chunky is user supplied file which can change. Is this possible as an alias or... (1 Reply)
Discussion started by: ospreyeagle
1 Replies
Login or Register to Ask a Question