Sponsored Content
Top Forums Shell Programming and Scripting binary operator expected error Post 302117272 by cfajohnson on Friday 11th of May 2007 04:57:31 PM
Old 05-11-2007
Quote:
Originally Posted by apps_user
Actually I have some text files in the directory that starts with EPISGCHGS.
Here I am checking if there is no file with the above extension then exit else copy all the files that start with EPISGCHGS to one file called ultisource.txt .
##############################
if [ -r EPISGCHGS*.txt ]
then
for file in EPISGCHGS*.txt
do
cat $file > ultisource.txt
done
else
echo no files found....exiting
exit 0
fi
##############################

Code:
set -- EPISGCHGS*.txt
[ -r "$1" ] && cat EPISGCHGS*.txt > ultisource.txt


 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Binary operator expected

Within my script, there is this following if, then statement. It basically looks for files in a directory that match a certain naming convention (bingofile*.DAT) and are non empty files and moves these files to a diff. directory. The script works okay if there is only one file matching the search... (4 Replies)
Discussion started by: basisvasis
4 Replies

2. UNIX for Dummies Questions & Answers

unary operator expected error

Hi I am doing a script like if then echo "table name dosent exist" exit fi the problem is if $table_name is null then i am getting the error Please help me Thanks in advance (2 Replies)
Discussion started by: ssuresh1999
2 Replies

3. UNIX for Dummies Questions & Answers

Error : -ne: unary operator expected

find . -name "*.*"|xargs grep WT:DBF_WL>> $F Wfexist=`cat $F|grep $i` echo $Wfexist if ; then echo $Wfexist echo "Workflow Exist" else touch $O chmod 777 $O echo $Wfexist echo $WfExist >> $O fi I am getting the error that -ne: unary operator expected in the line with red... (2 Replies)
Discussion started by: ritu.s
2 Replies

4. Linux

Binary operator expected

hi i'm trying to do program that counts the total no of words from files from a directory and all it's subdirectories.ang i get the binary operator expected error at line 7 and line 12.can you please help me with this as quick as possible? if test -d $1 then sum=0 for name in $1/* do... (2 Replies)
Discussion started by: marian
2 Replies

5. Shell Programming and Scripting

bash script error with binary operator expected.

Hello, I am not sure, where I am missing in the scirpt, I am trying to grep few users from /etc/passwd file and if exists, I added line to echo as user exist, if not create it. #!/bin/bash for vid in v707 z307 z496 z163 z292 ; do if then echo " $vid User exists " else ... (2 Replies)
Discussion started by: bobby320
2 Replies

6. Shell Programming and Scripting

Binary Operator expected while executing the below shell script.

Hi Experts, Iam bit poor in shell scripting, Here my requirement is for generating an alert where the oracle database db_recovery_file_dest_size usage. If it reaches beyond 80% should recieve an alert through an email. Want to schedule this alert in cron. #!/bin/bash .... (9 Replies)
Discussion started by: Jagadish m
9 Replies

7. Shell Programming and Scripting

Help - binary operator expected error

Hello Unix forum. I'm encountering the following error "binary operator expected error" and I cannot seem to solve the issue. I have the following source files to process: CPA_LOOKUP_dat.lst PROFILE_TXN__dat.lst TRANSACTION_CODE_dat.lst PROFILE_TXN_OUT_OF_BALANCE_dat.lst ... (2 Replies)
Discussion started by: pchang
2 Replies

8. Shell Programming and Scripting

Binary operator expected Error

Here is line number 59 of my script 59 if ; thenI get the following error at this line. Can you please explain why ? (1 Reply)
Discussion started by: mohtashims
1 Replies

9. UNIX for Beginners Questions & Answers

Binary operator expected

Hi Team, I just started to learn shell scripting and i got this script from an online book and tried to run in my terminal. But it throws error message. echo $0 -bash echo $UID 501 cat check_rootuser.sh #!/bin/bash # Run as root, of course. LOG_DIR=/var/log ROOT_UID=0 # Only users... (4 Replies)
Discussion started by: SelvaKumarq
4 Replies

10. Shell Programming and Scripting

Conditional binary operator expected Error

Hi, Below is my code where i m trying to grep for name>$servername in manages*.tmp files servername="serv1" set manages*.tmp if ; then However, i get the below error at the if condition: Can you please suggest how can i fix the problem. (3 Replies)
Discussion started by: mohtashims
3 Replies
CREATEABLBINEXPR(3)						   ABL FUNCTIONS					       CREATEABLBINEXPR(3)

NAME
createablbinexpr - creates a binary operator expression. ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSYS
#include "abl101.h" chain_list *createablbinexpr( Oper, Expr1, Expr2 ) long Oper; chain_list *Expr1; chain_list *Expr2; PARAMETERS
Oper The operator number. Expr1 The first expression. Expr2 The second expression. DESCRIPTION
createablbinexpr creates the binary operator expression Expr1 Operator Expr2. If the operator of Expr1 and/or Expr2, and Operator are identicals createablbinexpr merges eventually the sub-expressions. The expression pointers Expr1 and Expr2 MUSTN'T be used after the call to this function. RETURN VALUE
createablbinexpr returns a pointer to the new operator expression. ERRORS
"ablcreate: bad operator xx !", Operator must be defined and must be a binary operator. EXAMPLE
#include "abl101.h" chain_list *ExprA; chain_list *ExprB; chain_list *ExprAorB; ExprA = createablatom( "a" ); ExprB = createablatom( "b" ); ExprAorB = createablbinexpr( ABL_OR, ExprA, ExprB ); SEE ALSO
abl(1) createablatom(3), createabloper(3), createablxorbinexpr(3), createablunaryexpr(3), createablnotexpr(3), addablhexpr(3), addablq- expr(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 October 1, 1997 CREATEABLBINEXPR(3)
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy