Hello guys! It's orszhak and in my book I am currently studying incrementing values in c++ and it states thant I could do this to increment the value of nVariable
it states that I could also do this and assign the same value
but can't I also do this and assign the same value to the variable? here:
Or what about this
Anyways thanks guys!
I'm using the following command to test for certain characters in a script
echo "${1}" | grep '\$'
if (( ${?} == 0 ))
then
testing this script on the command line I have
ksh -x script1.sh "xxxx$xxxx"
this works fine but when I want to use
ksh -x script1.sh "xxxx $xxx"
the... (1 Reply)
I am looking for 8 variables in the following profile. I am looking to see if anyone could explain this for me better than the book I am using has been able to. There are 5 system, 2 aliases, and one editor. The profile is as follows:
# @(#)local.profile 1.8 99/03/26 SMI
stty istrip... (0 Replies)
Hi,
I am trying to do some mass replacements in lots of scripts, and using sed.
However sed doesn't seem to like to be able to dereference variables within the substitute clause. For example:
tab=newtable
cat f1 | sed 's/oldtable/$tab/g' doesn't work.
it would replace oldtable with the... (2 Replies)
Hi everybody, im trying to store a path "address" of a file in a variable, then IF the Address that the user entered INSIDE the variable is exist, do something, else echo invalid file address.
here's my code, but it's not working i dunno why:
$variable
cat > variable
#variable will contain... (4 Replies)
Hi
I am trying to find were to look for definitions of these variables; $0, $1, $2, $#, $$ , $*. I am not having much luck with my searching. Can anyone point me in the right direction?
Thanks, Doug (3 Replies)
I kind of found out the hard way that I am not able to manipulate the null value, the long silence that happens when there is no value returned.
I am looking for PIDs, and when there is no PID return, I wanted to handle this special scenario.
Here is my script.
#!/bin/bash
LAN_VARIABLE=... (7 Replies)
I am running some commands and I am trying to get an output into a variable. I am having problem when I try to put that value in while loop, it says integer value expected. What's the best way to accomplish this
remaining=$(symclone -sid XXX -f Clone_test query | grep MB | awk '{print... (1 Reply)
I have 2 scripts first script would call second script.
test1.sh
#!/bin/bash
logfile=`basename $0`.log
echo "First File" >> $logfile
TIME=`ls -lu array.ksh | awk '{print $6" "$7" "$8}'`
. /home/infrmtca/bin/Test/test2.sh
#/home/infrmtca/bin/Test/test2.sh
test2.sh
#!/bin/bash... (1 Reply)
Discussion started by: Ariean
1 Replies
LEARN ABOUT OPENDARWIN
error
error(n) Tcl Built-In Commands error(n)
__________________________________________________________________________________________________________________________________________________NAME
error - Generate an error
SYNOPSIS
error message ?info? ?code?
_________________________________________________________________DESCRIPTION
Returns a TCL_ERROR code, which causes command interpretation to be unwound. Message is a string that is returned to the application to
indicate what went wrong.
If the info argument is provided and is non-empty, it is used to initialize the global variable errorInfo. errorInfo is used to accumulate
a stack trace of what was in progress when an error occurred; as nested commands unwind, the Tcl interpreter adds information to errorInfo.
If the info argument is present, it is used to initialize errorInfo and the first increment of unwind information will not be added by the
Tcl interpreter. In other words, the command containing the error command will not appear in errorInfo; in its place will be info. This
feature is most useful in conjunction with the catch command: if a caught error cannot be handled successfully, info can be used to return
a stack trace reflecting the original point of occurrence of the error:
catch {...} errMsg
set savedInfo $errorInfo
...
error $errMsg $savedInfo
If the code argument is present, then its value is stored in the errorCode global variable. This variable is intended to hold a machine-
readable description of the error in cases where such information is available; see the tclvars manual page for information on the proper
format for the variable. If the code argument is not present, then errorCode is automatically reset to ``NONE'' by the Tcl interpreter as
part of processing the error generated by the command.
SEE ALSO
catch(n), tclvars(n)
KEYWORDS
error, errorCode, errorInfo
Tcl error(n)