Sponsored Content
Full Discussion: question about getopt()
Top Forums Programming question about getopt() Post 28230 by hell666 on Monday 16th of September 2002 02:04:36 AM
Old 09-16-2002
'optarg' is of type 'string' (char *). If 'off_t' is of type int, use atoi() to convert optarg to type off_t.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getopt help

scriptname i have made a script to perform so tasks and i managed to complete the tasks for all the options the problem i am facing is that i can run the scripts individually but i would like to make it such that it can accept multiple options and give me the appropriate output e.g.... (1 Reply)
Discussion started by: problems
1 Replies

2. Shell Programming and Scripting

getopt

#!/bin/sh set -- `getopt "abco:" "$@"` a= b= c= o= while : do case "$1" in -a) a=1;; -b) b=1;; -c) c=1;; -o) shift; o="$1";; --) break;; esac shift done shift # get rid of -- # rest of script... # e.g. ls -l $@ (6 Replies)
Discussion started by: Hitori
6 Replies

3. Shell Programming and Scripting

getopt help

I m trying to use getopt This is my script, but it doesn't take argument in variable, Please help. set - - `getopt mscl: $*` if then echo "Exiting...." exit 2 fi for i in $* do case $i in -m) MAIL="$i"; shift;; -s) SCRIPT=$OPTARG; shift;; -c) COB=$OPTARG; shift;;... (2 Replies)
Discussion started by: darshakraut
2 Replies

4. Shell Programming and Scripting

getopt help

:) Can anybody help me about how to use getopt in shell scripting. (3 Replies)
Discussion started by: darshakraut
3 Replies

5. Solaris

use of getopt command

Hi All, Could anyone tell me how to use getopt command.....? Thanks, Pintu (2 Replies)
Discussion started by: pintupatro
2 Replies

6. Shell Programming and Scripting

Help with getopt

Hi, I want to use the getopt function to parse some arguments for a script. while getopts "i:f:r:" OPTION do case $OPTION in i) iter=$OPTARG;; f) frame=$OPTARG;; r) roi=$OPTARG;; ?) echo Usage: ...... exit 2;; esac done However, I... (5 Replies)
Discussion started by: giorgos193
5 Replies

7. Shell Programming and Scripting

Help with Getopt::Std

I am working on a script that lists files in a directory with a few file attributes depending on what option the user specifies at the command prompt. The script uses Getopt::Std and takes two switches. The first switch allows the user to specify a directory, the second switch gives a long... (3 Replies)
Discussion started by: Breakology
3 Replies

8. Shell Programming and Scripting

Perl Getopt::Long question - stopping multiple args

Hi there, I have an example basic script (below) and ive been trying to figure out how to stop multiple arguments to my options occuring. for example using the example script below I can issue two arguments for, say the --surname option and it will not barf at me (although thats what i want it to... (11 Replies)
Discussion started by: rethink
11 Replies

9. Shell Programming and Scripting

getopt in CSH

I am struggling to understand how getopt can be used in a csh script. can anybody post a csh script using getopt. Please! (4 Replies)
Discussion started by: animesharma
4 Replies

10. Shell Programming and Scripting

Getopt Help

Hi All, An old work friend wrote a script which I've been trying to understand how a section of it currently works and work out how i can add some command line switches which i can use later in the script to append the output depending on the command line arguements. Currently it works by... (1 Reply)
Discussion started by: mutley2202
1 Replies
gd_frameoffset64(3)						      GETDATA						       gd_frameoffset64(3)

NAME
gd_frameoffset64, gd_alter_frameoffset64 -- report or change the frame offset of fields in a dirfile, with largefile support SYNOPSIS
#define _LARGEFILE64_SOURCE #include <getdata.h> off64_t gd_frameoffset(DIRFILE *dirfile, int fragment_index); int gd_alter_frameoffset64(DIRFILE *dirfile, off64_t offset, int fragment_index, int move); DESCRIPTION
These version of gd_frameoffset(3) and gd_alter_frameoffset(3) use a 64-bit offset type, even if off_t is a 32-bit type. They are only available if the caller defines _LARGEFILE64_SOURCE before including getdata.h. If off_t is a 64-bit type (i.e. if _FILE_OFFSET_BITS is defined to be 64), these function will be called gd_frameoffset() and gd_al- ter_frameoffset(). Otherwise, gd_frameoffset() and gd_alter_frameoffset() will be versions of these functions which use a 32-bit off_t. SEE ALSO
gd_alter_frameoffset(3), gd_frameoffset(3), feature_test_macros(7) Version 0.7.0 16 July 2010 gd_frameoffset64(3)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy