Search Results

Search: Posts Made By: zagga
4,333
Posted By zagga
Heartfelt thanks CarloM. I would never have got...
Heartfelt thanks CarloM. I would never have got there in a month of Sundays.
4,333
Posted By zagga
Thanks CarloM, this is what I did with your gawk...
Thanks CarloM, this is what I did with your gawk proposal to analyse ${0} and populate the variables V_SEVERITY and V_INFO:

V_SEVERITY=`echo ${V_MEM_PARAMETERS} | gawk --re-interval '{...
4,333
Posted By zagga
Ahamed In all there are 14 arguments. The...
Ahamed

In all there are 14 arguments. The first 12 arguments are variable in length but are separated by single space characters, so they pose no problems.
Arguments 13 and 14 are optional, when...
4,333
Posted By zagga
Ahamed, CarloM I still have the same problem...
Ahamed, CarloM

I still have the same problem in cases 3 and 4 using Ahamed's proposed solution:

If argument 13 is empty, there will be FS+4 spaces + FS (ie 6 spaces in all).
In case three, the...
4,333
Posted By zagga
Thanks for your interest guys: Below is the...
Thanks for your interest guys:

Below is the script instruction intended to recuperate Arguments 13 (4 cars) and 14 (50 cars).
Arguments 1-12 are variable length and separated by a space.

...
4,333
Posted By zagga
Sorry Franklin52 that doesn't seem to work: ...
Sorry Franklin52 that doesn't seem to work:

Case 1:
if both $14 and 15 are null ie full of spaces.
I get Arg14=" " and Arg15 has nothing.

Case 2:
if $14="3333" and $15 is null
I get...
4,333
Posted By zagga
NO in fact I have 56 spaces at the end of the...
NO in fact I have 56 spaces at the end of the record. But the good news is the last two fields are fixed length which is not the case of all the preceding fields. Arg14= 4 cars Arg15=50 cars + 2...
4,333
Posted By zagga
Thanks very much Franklin52, your solution works...
Thanks very much Franklin52, your solution works fine while arguments 14 and 15 are populated. Unfortunately I omitted to mention that these fields are optional.
After testing: if Arg14 and Arg15...
4,333
Posted By zagga
The last argument contains spaces, how do I get it into a variable?
Gooday
I have an argument string that contains 15 arguments.
The first 14 arguments are easy to handle because they are separated by spaces

ARG14=`echo ${ARGSTRING} | awk '{print $14}'`

The...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy