Sponsored Content
Top Forums Shell Programming and Scripting TCL: syntax error in expression with "*" Post 302870803 by ENG_MOHD on Monday 4th of November 2013 07:18:54 PM
Old 11-04-2013
TCL: syntax error in expression with "*"

I'm using tcl scripts in ns2 ( network simulator) through cygwin. It works fine , however, I downloaded an example when i run it , I got the following syntax error:

Code:
syntax error in expression with " *2" : unexpected operator *
while executing :
"expr $bw *2"
invoked from within:
"$ns duplex-link $n1 $n3 [expr  $bw *2] Mb [expr  $rtt_1 /2-1 ]ms DropTail"

I tried to comment this line to see if the error from something else, I got the error whenever there is a line with "*"

Any suggestions??Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"syntax error at line 21 :'done' unexpected." error message"

I am trying to run the script bellow but its given me "syntax error at line 20 :'done' unexpected." error message" can someone check to see if the script is ok? and correct me pls. Today is my first day with scripting. Gurus should pls help out #!/bin/ksh # Purpose: Check to see if file... (3 Replies)
Discussion started by: ibroxy
3 Replies

2. Shell Programming and Scripting

error "integer expression expected" when selecting values

dear members, I am having some difficulties with an automation script that I am writing. We have equipments deployed over our network that generate status messages and I was trying an automated method to collect all information. I did a expect script that telnet all devices, logs, asks for... (4 Replies)
Discussion started by: jorlando
4 Replies

3. Shell Programming and Scripting

"directory checksum error" when attempting to install tcl

OS: HP-UX Programs I want to install: expect and tcl I'm lost. I bought the book. I began reading the book. I want to install expect. I've been able to download the .z, and extract it successfully. But, of course, it apparently needs tcl and possibly tk also, and ... I... (0 Replies)
Discussion started by: instant000
0 Replies

4. Shell Programming and Scripting

ksh-script "arithmetic syntax error" comparing strings

Hi all, Iīve already searched the forum but canīt find what i am doing wrong. I am trying to compare two variables using ksh under red hat. The error I get is: -ksh: .: MDA=`md5sum /tmp/ftp_dir_after_transfer | cut -d' ' -f1 ` MDB=`md5sum /tmp/ftp_dir_before_transfer | cut -d' ' -f1 `... (3 Replies)
Discussion started by: old_mike
3 Replies

5. Fedora

"integer expression expected" error with drive space monitoring script

Hi guys, I am still kinda new to Linux. Script template I found on the net and adapted for our environment: #!/bin/sh #set -x ADMIN="admin@mydomain.com" ALERT=10 df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output ... (2 Replies)
Discussion started by: wbdevilliers
2 Replies

6. Shell Programming and Scripting

cshell integer expression from "0000" to "1999"

I have 2000 files named like "file-fr0000.log", "file-fr1999.log"... I wanna generate the file names automatically in the following c shell script: set fr = 0 while ($fr <= 1999) grep "ENERGY" file-fr$fr.log > data.dat @ fr = ( $fr + 1 ) end The above will generate file names... (3 Replies)
Discussion started by: rockytodd
3 Replies

7. Shell Programming and Scripting

Bash (Ubuntu server): Syntax error: "|" unexpected in While-loop

Hello forum, I hope my problem is easy to solve for someone in here! My main task is to copy a large amount of imap-accounts from one server to another. There is a tool (Perl) called imapsync which does the job exellent. Unfortunately I'm only able to run it on one account at a time. After... (3 Replies)
Discussion started by: primaxx
3 Replies

8. UNIX for Dummies Questions & Answers

redirect for "[: : integer expression expected" error

Hi, I read in this forum that for "https://www.unix.com/shell-programming-scripting/156008-integer-expression-expected-regular-expression.html thanks! (7 Replies)
Discussion started by: Vijay81
7 Replies

9. Shell Programming and Scripting

Help with FTP Script which is causing "syntax error: unexpected end of file" Error

Hi All, Please hav a look at the below peice of script and let me know if there are any syntax errors. i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
Discussion started by: mahi_mayu069
1 Replies

10. BSD

Keep getting error "-bash: ./.profile_z2: line 52: syntax error: unexpected end of file"

#!/bin/bash #-------------------------------------------------------- # Setup prompt # Author Zeeshan Mirza # Data: 06-08-2017 #-------------------------------------------------------- if then . ./.profile_custom_pre fi umask 022 set -o vi export EDITOR=vi export VISUAL=vi... (3 Replies)
Discussion started by: getzeeshan
3 Replies
DWARF_ADD_EXPR_GEN(3)					   BSD Library Functions Manual 				     DWARF_ADD_EXPR_GEN(3)

NAME
dwarf_add_expr_gen -- add an operator to a location expression descriptor LIBRARY
DWARF Access Library (libdwarf, -ldwarf) SYNOPSIS
#include <libdwarf.h> Dwarf_Unsigned dwarf_add_expr_gen(Dwarf_P_Expr expr, Dwarf_Small opcode, Dwarf_Unsigned val1, Dwarf_Unsigned val2, Dwarf_Error *err); DESCRIPTION
Function dwarf_add_expr_gen() adds a location expression operator to the location expression descriptor referenced by argument expr. Argument expr should reference a location expression descriptor allocated using the function dwarf_new_expr(3). Argument opcode specifies the operation code of the location expression operator. Valid values for this argument are those denoted by the DW_OP_* constants defined in <libdwarf.h>. To generate a DW_OP_addr operation, application code should instead use dwarf_add_expr_addr_b(3). Argument val1 specifies the first operand of the location expression operator. Argument val2 specifies the second operand of the location expression operator. If argument err is not NULL, it will be used to store error information in case of an error. RETURN VALUES
On success, function dwarf_add_expr_gen() returns the size in bytes of the location expression byte stream generated. In case of an error, function dwarf_add_expr_gen() returns DW_DLV_NOCOUNT and sets the argument err. ERRORS
Function dwarf_add_expr_gen() can fail with: [DW_DLE_ARGUMENT] Argument expr was NULL. [DW_DLE_LOC_EXPR_BAD] The operation code specified in argument opcode was invalid. [DW_DLE_MEMORY] An out of memory condition was encountered during the execution of the function. SEE ALSO
dwarf(3), dwarf_add_AT_location_expr(3), dwarf_add_expr_addr(3), dwarf_add_expr_addr_b(3), dwarf_expr_current_offset(3), dwarf_expr_into_block(3), dwarf_new_expr(3) BSD
September 9, 2011 BSD
All times are GMT -4. The time now is 06:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy