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 OPENSOLARIS
catgets
catgets(3C) Standard C Library Functions catgets(3C)NAME
catgets - read a program message
SYNOPSIS
#include <nl_types.h>
char *catgets(nl_catd catd, int set_num, int msg_num, const char *s);
DESCRIPTION
The catgets() function attempts to read message msg_num, in set set_num, from the message catalog identified by catd. The catd argument is
a catalog descriptor returned from an earlier call to catopen(). The s argument points to a default message string which will be returned
by catgets() if the identified message catalog is not currently available.
RETURN VALUES
If the identified message is retrieved successfully, catgets() returns a pointer to an internal buffer area containing the null termi-
nated message string. If the call is unsuccessful for any reason, catgets() returns a pointer to s and errno may be set to indicate the
error.
ERRORS
The catgets() function may fail if:
EBADF The catd argument is not a valid message catalogue descriptor open for reading.
EBADMSG The number of %n specifiers that appear in the message string specified by s does not match the number of %n specifiers that
appear in the message identified by set_id and msg_id in the specified message catalog.
EINTR The read operation was terminated due to the receipt of a signal, and no data was transferred.
EINVAL The message catalog identified by catd is corrupted.
ENOMSG The message identified by set_id and msg_id is not in the message catalog.
USAGE
The catgets() function can be used safely in multithreaded applications as long as setlocale(3C) is not being called to change the locale.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO gencat(1), catclose(3C), catopen(3C), gettext(3C), setlocale(3C), attributes(5), standards(5)
International Language Environments Guide
SunOS 5.11 22 Mar 2002 catgets(3C)