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:
I tried to comment this line to see if the error from something else, I got the error whenever there is a line with "*"
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)
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)
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)
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)
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)
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)
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)
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)
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)
#!/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
LEARN ABOUT FREEBSD
dwarf_add_expr_gen
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