hi all!
i have a working that looks like this...
file1
MALE JOHN
MALE ANJO
FEMALE ANNE
MALE JAMES
FEMALE HONEY
FEMALE IZA
what i want to do is insert "M" when the first string is "MALE" and insert "F" when the first string is "FEMALE".
file1
M MALE ... (10 Replies)
Now I have a list of numbers in hand and I try to put the numbers into two columns. Can I do this work with any script? Great thanks to your help!
1A1.log
HF=-240.451527
HF=-240.5213996
1A2.log
HF=-240.451527
HF=-240.5213996
1B.log
HF=-240.4273718
HF=-240.4956636
1C.log... (7 Replies)
hello,
I am writting a regular expression that intend to match any tunnel or serial interface but it doesn't mtach any serial sub-interface.
For example, statement should match "Tunnel3" or "Serial0/1" but shouldn't match "Serial0\1.1" (doesn't include dot ".")
I tried the following but... (3 Replies)
I've a problem to put .h end of the line..below my input file
fg_a
bb
fg_b
bb
fg_c
bb
fg_d
aa
fg_f
ee
and i want the output file as below
fg_a.h
bb
fg_b.h
bb
fg_c.h
bb
fg_d.h (6 Replies)
I have several file as below, and i want to put .txt to specific text contain ^main=EXE^cmd=run script /usr/prog/bd_,
file1
7.9102 12.1528 16.3672 7.4002
^main=EXE^cmd=run script /usr/prog/bd_123^"
line 16.3672 7.3134 17.8711 6.0981
file 2
7.9102 12.1528 16.3672 7.4002 ... (8 Replies)
Hello,
I need to put the following string to the beginning of a file - but it should not create a newline at the end of the string.
So, the file I have is a compressed one - with gzip.
And I would like to add an ASCII-String to the beginning of the file. The string has a length of 69... (5 Replies)
Hello.
I would like to search exactly "string1.string2.string3" and replace it by "new_string1.new_string2.new_string3"
And
I would like to search exactly "string2.string3" and replace it by "new_string2.new_string3"
And
I would not found in the result : "string1.new_string2.new_string3"... (3 Replies)
I have a string:
Code
time=20170303122334
I need the result:
20170303.122334
I did:
CODE:
ttdotss=`echo ${time} |sed 's\(.|{8\}\)/|1 /g'`
Result
sed: Function s\(.|{8\}\)/|1 /g cannot be parsed.
Could you please help me to resolve this issue?
Thanks for contribution (2 Replies)
I have a string time=20170303201234
I want to split it and put a dot
result:
20170303.201234
CODE:
ttdotss=`echo ${time} | {8}.{8}`
Doesn't understand
I tried this:
CODE:
ttdotss=`echo ${time} |cut -c 1-8 | . | cut -c 9-14`
Result:
script: .: argument expected... (4 Replies)
Discussion started by: digioleg54
4 Replies
LEARN ABOUT HPUX
xrmstringta
XrmStringToBindingQuarkList() XrmStringToBindingQuarkList()
Name
XrmStringToBindingQuarkList - convert a key string to a binding list and a quark list.
Synopsis
XrmStringToBindingQuarkList(string, bindings_return, quarks_return)
char *string;
XrmBindingList bindings_return;
XrmQuarkList quarks_return;
Arguments
string Specifies the string for which the list of quarks and list of bindings_return are to be generated. Must be NULL-terminated.
bindings_return
Returns the binding list. The caller must allocate sufficient space for the binding list before the call.
quarks_return
Returns the list of quarks. The caller must allocate sufficient space for the quarks list before the call.
Description
XrmStringToBindingQuarkList() converts a resource specification string into two lists - one of quarks and one of bindings. Component names
in the list are separated by a dot (.) indicating a tight binding or an asterisk (*) indicating a loose binding. If the string does not
start with dot or asterisk, a dot (".") is assumed.
A tight binding means that the quarks on either side of the binding are consecutive in the key. A loose binding, on the other hand, is a
wildcard that can match any number of unspecified components in between the two quarks separated by the binding. Tight and loose bindings
are used in the match rules, which compare multicomponent strings to find matches and determine the best match. See XrmGetResource() for a
full description of lookup rules.
For example, *a.b*c becomes:
quarks bindings
a XrmBindLoosely
b XrmBindTightly
c XrmBindLoosely
For more information, see Volume One, Chapter 13, Managing User Preferences.Structures
typedef int XrmQuark, *XrmQuarkList;
typedef enum (
XrmBindLoosely, XrmBindTightly
) XrmBinding, *XrmBindingList;
See Also
XrmDestroyDatabase(), XrmGetFileDatabase(), XrmGetResource(), XrmGetStringDatabase(), XrmInitialize(), XrmMergeDatabases(), XrmParseCom-
mand(), XrmPutFileDatabase(), XrmPutLineResource(), XrmPutResource(), XrmPutStringResource(), XrmQGetResource(), XrmQGetSearchList(),
XrmQGetSearchResource(), XrmQPutResource(), XrmQPutStringResource(), XrmQuarkToString(), XrmStringToQuarkList(), XrmStringToQuark(), XrmU-
niqueQuark().
Xlib - Resource Manager XrmStringToBindingQuarkList()