Hi,
I know, particular value in the variable should always be of lenth 7 , but the value that is present in thevariable might be of any no.of characters less than or equal to 7... if the no.of characters in the variable is less than 7, I want to add, zeroes at the starting of the field.. How can... (3 Replies)
how we can replace char with a string
example
char *a="a.s"
so finally
what i ant to do
raplace a with ant and s sree
so in my array a i want to store the value as "ant.sree"
thank u in advance (1 Reply)
i have a script that reads a plain text file. (its a ksh, and i can use bash also)
each line of the file is a fullpath of a file. that makes the list huge.
i need to add a functionalitie to that script, i have to be able to add
/usr/* or /usr/ and with that reference all the files and folders... (6 Replies)
for example:
i hav a string like :
/rmsprd/arch01/rmsprd/rmsprdarch72736.log
how I can extract
my_num=72736?
I know I can
echo "/rmsprd/arch01/rmsprd/rmsprdarch72736.log" | tr "/" " " | awk '{ print $4 }' to get rmsprdarch72736.log (4 Replies)
I am new to bash scripts I need something quite easy to do in VBS,
When I wanted to get the first 5 chars I used funcition right(5,strGet)
how can I do the same in bash?
I am trying to get the MAC address in Ubuntu I have done so far
ifconfig wlan2 | grep HWaddr | awk '{print $5}' | sed -e... (3 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hi everyone,
I am working on fetchmail + procmail to filter mails and I am having problem with parsing a long line in the body of the email.
Could anyone help me construct a reg exp for this string below. It needs to match exactly as this string.
GetRyt... (4 Replies)
I am using ifstream to open a file using
std::fstream::open
void open ( const char * filename, ios_base::openmode mode = ios_base::in );
However I want to use a string instead of a char* as follows but having a problem on how to do this
string val_ifmodl = “fred.modl”
ifstream ifs_modl;... (2 Replies)
Hi All,
i'm working on some report and currently have this plain text file generated.
server_name1|sdfd1deal | 1048572| 1040952| 99| 207| 1| 1
server_name1|dba1dbs | 83886048| 40730796| 48| 5762| 22764| 8... (4 Replies)
Discussion started by: fedora132010
4 Replies
LEARN ABOUT HPUX
getopt
getopt(1) General Commands Manual getopt(1)NAME
getopt - parse command options
SYNOPSIS
optstring args
DESCRIPTION
is used to break up options in command lines for easy parsing by shell procedures and to check for legal options. optstring is a string of
recognized option letters (see getopt(3C)). If a letter is followed by a colon, the option is expected to have an argument, which may or
may not be separated from it by whitespace.
The positional parameters ...) of the shell are reset so that each option is preceded by a and is in its own positional parameter; each
option argument is also parsed into its own positional parameter.
recognizes two hyphens to delimit the end of the options. If absent, places at the end of the options.
The most common use of is in the shell's command (see the example below) where converts the command line to a more easily parsed form.
writes the modified command line to the standard output.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able.
If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable
contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single-byte and multibyte character code sets are supported.
DIAGNOSTICS
prints an error message on the standard error when it encounters an option letter that is not included in optstring.
EXAMPLES
The following code fragment processes the arguments for a command that can take the options or and the option which requires an argument:
This code accepts any of the following as equivalent:
WARNINGS
option arguments must not be null strings nor contain embedded blanks.
SEE ALSO getopts(1), sh(1), getopt(3C).
getopt(1)