Greetings all,
I'm currently making use of the $HOME/.ssh/rc file to launch an automated shell script immediately after the user has been verified through ssh.
The current problem that I'm facing now is that I am unable to use the "read" command anymore... seems like the "read" statements are... (0 Replies)
I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie.
I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me.
... (2 Replies)
Hi All
I have something that from the outset seems really trivial but in practice is not quite working.
I have the following code sample in my shell script which illustrates the problem
echo "enter home directory"
read home
mkdir $home/newdir
The user then enters a logical $HOME... (3 Replies)
Hello All
i have input files contains 2 values as following
20-Oct-09 Z59408009
20-Oct-09 Z59423060
and i am using the following script
cat /home/or/input.txt | awk '{print $2}' >log
count=0
while read line; do
count=$(( count + 1 ))
echo "UPDATE SAT_JRLTRT SET AVT='X' WHERE... (6 Replies)
I cannot get the following substitution ($ORACLE_SID) to work:
The variable ORACLE_SID is set to wardin my environment. It has been exported.
I have a text file called test.dat:
/u07/oradata/${ORACLE_SID}/extab/finmart/summit/ps_voucher_line_crnt_ex.dbf... (2 Replies)
Hi , I have below command to that outputs from variables..
command:
echo $INSTANCE $DATAB $status $TSLastBackup| awk '{printf("%-8s %-8s \t \n",$1,$2,$3,$4)}' | tee $LOGF
the ouput is now:
INSTANCE DATABSE BACKUP_STATUS BACKUPTIMESTAMP
------- -------- -------- ... (1 Reply)
I have a script like this (Yes, I know the DAY6 number isn't right - I'm just testing at this point):
DAY0=`date -I`
DAY1=`date -I -d "1 day ago"`
DAY6=`date -I -d "2 days ago"`
if
then
ssh root@synology1 nohup rm -rf "/volume1/Fileserver/$DAY6"
fi
I've tested the line to remove the... (5 Replies)
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
LEARN ABOUT OPENDARWIN
tcl_updatelinkedvar
Tcl_LinkVar(3) Tcl Library Procedures Tcl_LinkVar(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_LinkVar, Tcl_UnlinkVar, Tcl_UpdateLinkedVar - link Tcl variable to C variable
SYNOPSIS
#include <tcl.h>
int
Tcl_LinkVar(interp, varName, addr, type)
Tcl_UnlinkVar(interp, varName)
Tcl_UpdateLinkedVar(interp, varName)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter that contains varName. Also used by Tcl_LinkVar to return error messages.
CONST char *varName (in) Name of global variable.
char *addr (in) Address of C variable that is to be linked to varName.
int type (in) Type of C variable. Must be one of TCL_LINK_INT, TCL_LINK_DOUBLE, TCL_LINK_WIDE_INT, TCL_LINK_BOOLEAN, |
or TCL_LINK_STRING, optionally OR'ed with TCL_LINK_READ_ONLY to make Tcl variable read-only.
_________________________________________________________________DESCRIPTION
Tcl_LinkVar uses variable traces to keep the Tcl variable named by varName in sync with the C variable at the address given by addr. When-
ever the Tcl variable is read the value of the C variable will be returned, and whenever the Tcl variable is written the C variable will be
updated to have the same value. Tcl_LinkVar normally returns TCL_OK; if an error occurs while setting up the link (e.g. because varName
is the name of array) then TCL_ERROR is returned and the interpreter's result contains an error message.
The type argument specifies the type of the C variable, and must have one of the following values, optionally OR'ed with
TCL_LINK_READ_ONLY:
TCL_LINK_INT
The C variable is of type int. Any value written into the Tcl variable must have a proper integer form acceptable to Tcl_GetIntFro-
mObj; attempts to write non-integer values into varName will be rejected with Tcl errors.
TCL_LINK_DOUBLE
The C variable is of type double. Any value written into the Tcl variable must have a proper real form acceptable to Tcl_GetDouble-
FromObj; attempts to write non-real values into varName will be rejected with Tcl errors.
TCL_LINK_WIDE_INT
The C variable is of type Tcl_WideInt (which is an integer type at least 64-bits wide on all platforms that can support it.) Any |
value written into the Tcl variable must have a proper integer form acceptable to Tcl_GetWideIntFromObj; attempts to write non- |
integer values into varName will be rejected with Tcl errors.
TCL_LINK_BOOLEAN
The C variable is of type int. If its value is zero then it will read from Tcl as ``0''; otherwise it will read from Tcl as ``1''.
Whenever varName is modified, the C variable will be set to a 0 or 1 value. Any value written into the Tcl variable must have a
proper boolean form acceptable to Tcl_GetBooleanFromObj; attempts to write non-boolean values into varName will be rejected with
Tcl errors.
TCL_LINK_STRING
The C variable is of type char *. If its value is not NULL then it must be a pointer to a string allocated with Tcl_Alloc or |
ckalloc. Whenever the Tcl variable is modified the current C string will be freed and new memory will be allocated to hold a copy
of the variable's new value. If the C variable contains a NULL pointer then the Tcl variable will read as ``NULL''.
If the TCL_LINK_READ_ONLY flag is present in type then the variable will be read-only from Tcl, so that its value can only be changed by
modifying the C variable. Attempts to write the variable from Tcl will be rejected with errors.
Tcl_UnlinkVar removes the link previously set up for the variable given by varName. If there does not exist a link for varName then the
procedure has no effect.
Tcl_UpdateLinkedVar may be invoked after the C variable has changed to force the Tcl variable to be updated immediately. In many cases
this procedure is not needed, since any attempt to read the Tcl variable will return the latest value of the C variable. However, if a
trace has been set on the Tcl variable (such as a Tk widget that wishes to display the value of the variable), the trace will not trigger
when the C variable has changed. Tcl_UpdateLinkedVar ensures that any traces on the Tcl variable are invoked.
KEYWORDS
boolean, integer, link, read-only, real, string, traces, variable
Tcl 7.5 Tcl_LinkVar(3)