Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
I am trying to write a simple script which will take a variable with sed to take a line out of a text and display it
#!/bin/sh
exec 3<list
while read list<&3
do
echo $list
sed -n '$list p'<list2
done
this does not work, yet when I replace the $list variable from the sed command and... (1 Reply)
Hi,
Is there any way to assign defaults values to the shell variables without reassigning them ( restarting the session)
for example
after login the value of ORACLE_HOME=/a/b/c
i have changed this value from the console
export ORACLE_HOME=/c/d
now what if i want the value exported to... (1 Reply)
Hi GUYS,
I have function. I am assigning a line count to count variable. But it is throwing an error at this line.
function_recur (){
#file being created in this function
lenth = `wc -l function_outpu.dat`;
echo $lenth;
}
this is the error i got
rec.ksh: lenth: not found.
... (3 Replies)
Hi,
I am having a line which is separated by -
I need to extract each field and put into some variable.
a=`echo "this-is-the-case" | awk -F- '{print $1}' `
b=`echo "this-is-the-case" | awk -F- '{print $2}' `
c=`echo "this-is-the-case" | awk -F- '{print $3}' `
d=`echo "this-is-the-case" | awk... (2 Replies)
Hi all,
I want write a script to display 5rows at times from a input file.
my out like:
echo " display started"
r1
r2
r3
r4
r5
... Some action items...
again i need next 5 lines.
can you please advise. (2 Replies)
Hi Gurus,
I have a file named log with 2 lines
Each line is a file name. eg
$ cat log
monday
tuesday
I need to read log and assign each output(filename) to a different variable.
The following doesn't work:-
while read A B
do
echo " a is ${A} "
echo " b is ${B} "
done <... (6 Replies)
HELLO!!
I'm trying to pass a variable with in the 'sed' command (which would add some piece of code to file at a particular line). We can use
sed '{line-number}a\
alfjaljf\
aslfjsfsjafl\
adlfjaf\' file.txt
If file.txt is
Now, I would like to add the parameter 'lmn' after... (1 Reply)
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
LEARN ABOUT HPUX
xmcvtxmstringtoct
XmCvtXmStringToCT(library call) XmCvtXmStringToCT(library call)
NAME
XmCvtXmStringToCT -- A compound string function that converts a compound string to compound text
SYNOPSIS
#include <Xm/Xm.h>
char * XmCvtXmStringToCT(
XmString string);
DESCRIPTION
XmCvtXmStringToCT converts a compound string to a (char *) string in compound text format. The application must call XtAppInitialize
before calling this function. The converter uses the font list tag associated with a given compound string segment to select a compound
text format for that segment. A registry defines a mapping between font list tags and compound text encoding formats. The converter uses
the following algorithm for each compound string segment:
1. If the compound string segment tag is mapped to XmFONTLIST_DEFAULT_TAG in the registry, the converter passes the text of the compound
string segment to XmbTextListToTextProperty with an encoding style of XCompoundTextStyle and uses the resulting compound text for
that segment.
2. If the compound string segment tag is mapped to an MIT registered charset in the registry, the converter creates the compound text
for that segment using the charset (from the registry) and the text of the compound string segment as defined in the X Consortium
Standard Compound Text Encoding.
3. If the compound string segment tag is mapped to a charset in the registry that is neither XmFONTLIST_DEFAULT_TAG nor an MIT regis-
tered charset, the converter creates the compound text for that segment using the charset (from the registry) and the text of the
compound string segment as an "extended segment" with a variable number of octets per character.
4. If the compound string segment tag is not mapped in the registry, the result is implementation dependent.
string Specifies a compound string to be converted to compound text.
RETURN
Returns a (char *) string in compound text format. This format is described in the X Consortium Standard Compound Text Encoding. The
function allocates space to hold the returned string. The application is responsible for managing the allocated space. The application
can recover the allocated space by calling XtFree.
RELATED XmCvtCTToXmString(3), XmFontList(3), XmMapSegmentEncoding(3), XmRegisterSegmentEncoding(3), and XmString.
XmCvtXmStringToCT(library call)