11-14-2007
Quote:
Originally Posted by
arunchaudhary19
So I just only want to know that what that error means because I had never seen it before & what is compound expression?????????
Why not post the offending section of source code with immediate surrounds and any appropriate prototypes, it might help us tell you what may be going on.
If you do a good for "error: initializer expression list treated as compound expression" there are many cases of people having that error.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am using the code below to write a command to launch a script only if the number of users on the system is less than 10. The code below isn't working. Any suggestions? HELP..
if && ; then frizzle ; fi (3 Replies)
Discussion started by: spalmer
3 Replies
2. Shell Programming and Scripting
Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant.
THX! (2 Replies)
Discussion started by: Z0mby
2 Replies
3. Shell Programming and Scripting
HI again, still working on the assignment, which is really hard given we just started unix 4 weeks ago. This script should change the permission for the user depending if its x, w or r, to the opposite. When i try to run it, I am getting expression error. Can you spot where the problem is? I really... (3 Replies)
Discussion started by: morava
3 Replies
4. Shell Programming and Scripting
Hi All,
am trying to add two Inputs i.e., $1 and $2,
Code
#!/bin/sh
$num_sum=`expr $1+$2`
echo "Sum = $num_sum"
am giving statement sh arithemetic.sh 20 10
am getting error
arithemetic.sh: line 2: =20+10: command not found
Sum =
I want Output as
Sum = 30, (5 Replies)
Discussion started by: sunnix
5 Replies
5. Shell Programming and Scripting
#! /bin/csh
set umr=UMR
foreach i ( `ls`)
set file_nm=$i
set bh_nm=`echo $file_nm | cut -d"_" -f2`
if($bh_nm !=$umr) then
{
set bh_ext=`echo $file_nm | cut -d"_" -f4`
set bh_num_nm="$bh_nm $bh_ext a .txt"
mv $file_nm $bh_num_nm
}
... (1 Reply)
Discussion started by: jdsignature88
1 Replies
6. Shell Programming and Scripting
CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error.
source $CA_VERSION_DATA
if * ]
then
echo "CA_RELESE $CA_RELEASE is invalid"
exit -1
fi
+ source /etc/ncgl/ca_version_data
++ CA_PRODUCT_ID=samxts
++ CA_RELEASE=6
++ CA_WEEK_NO=7
++... (3 Replies)
Discussion started by: ketkee1985
3 Replies
7. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
8. Shell Programming and Scripting
HI ,
I have a variable "TYPE" which may contain different values.
and another variable $TYPE"_SOURCE"
I am using ${$TYPE"_SOURCE"} to get the value TYPE_SOURCE for eg.
TYPE=ABC
ABC_SOURCE=/abc/xyz
On using above command I am getting error : BAD SUBSTITUTION
eval is not installed... (2 Replies)
Discussion started by: aashish.sharma8
2 Replies
9. UNIX for Advanced & Expert Users
Hello All,
I'm trying to extract the lines between two consecutive elements of an array from a file.
My array looks like:
problem_arr=(PRS111 PRS213 PRS234)
j=0
while } ]
do
k=`expr $j + 1`
sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt
---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
10. Shell Programming and Scripting
Hello All,
Not sure why this is happening...
When the following If Statement is evaluated for some reason it is creating a file in the CWD called '0'. I've seen this happen
before, just not in an If Statement...
CODE:
if
then
DIR_NAME="$1"
DIR_SIZE=0
STATUS=""
else... (3 Replies)
Discussion started by: mrm5102
3 Replies
LEARN ABOUT CENTOS
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)