[Solved] I need to parse an username in parameters
Hi!
Thank you ina advance for your Help. Sorry my english, Im from Argentina!
Great Place!!!
So, here si my problem
I have a variable, lets say PARAMETERS that could be set like this:
So, I need to extract the name that is next to the -U flag (is the username)
In this case is sistemas
So the -U could came like a first parameter, in the middle or like the final parameter.
ALSO, it could be some cases where a U capital letter exist in the parameter variable, like this
Greetings,
The title pretty much says it all. I've snooped everywhere and can't find anything on this. Since our organization went to numeric usernames, using the u|U option for ps returns no processes. Example passwd entry:
320074:DjZAJKXun8HBs:10129:6006:Joe Y:/cadhome/analysis/jy:/bin/bash... (4 Replies)
Hi,
I have a quick question on parsing the hour/minute and value from a text file and remove the seconds portion. For example in the below text file:
20:26:01 95.83
20:27:01 96.06
20:28:01 95.99
20:29:01 7.11
20:30:01 5.16
20:31:01 8.27
20:32:02 9.79
20:33:01 11.27
20:34:01 7.83... (2 Replies)
Hi All,
I am writing a script where the first 5 parameters are mandatory but the script should be able to handle a maximum of 9 parameters (with the remainig 4 optional)
I would like to load all parameters from 5th parameter positioninto an array.
the piece of code I am writing for this:... (0 Replies)
I have a 2 column file.
Column 1 is a road ID number.
Column 2 is the date that the road surface condition was inspected.
Some roads have been inspected only once, while some roads have been inspected multiple times.
I would like to re-arrange the following example list:
1001 2001_01_01... (5 Replies)
how can i get the database name from a config file
its like this:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'userabc_wrdp1');
(there might be spaces in the front of "define")
i want to store... (0 Replies)
Hi,
I have an input file like
F : 0.1 : 0.002
P : 0.3 : 0.004
P : 0.5 : 0.008
P : 0.1 : 0.005
L : 0.05 : 0.02
P: 0.1 : 0.006
P : 0.01 : 0.08
F : 0.02 : 0.08
Expected output: (2 Replies)
Hi, this is my problem
I have script with two parameters -n name and -s surname. Both have arguments and I want to know how parse these parameters with getopts. When you write
./names -n John -s White
it find you all persons, which name is John White, but when you write
./names -n John ... (1 Reply)
Hi!
I have a bunch of HTML files, which I want to parse to CSV files. Every page has a table in it, and I need to parse each row into a csv record.
With awk and sed, I managed to put every table row in separate lines. So my file looks like this:
<TR> .... </TR>
<TR> .... </TR>
...One... (1 Reply)
Hello,
On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command.
tunrestore -R is present in inittab
in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log
... (0 Replies)
anybody know a nice way to parse long input parameters such as --path /dir1/dir2/ (see below). Now I have more than 10 input parameters and it's confusing having parameters like -q something, I would prefer longer ones
case $OPTKEY in
--path) M_PATH=$OPTARG ;;
-s) ... (3 Replies)