Script 1.ksh
=========
/home/adw/a.ksh << **
a
b
Script 1.ksh is working fine even without ending "**"
Script 2.ksh
=========
if then
/home/adw/a.ksh << **
a
b
fi
But the script 2.ksh is giving error "syntax error : `<<' unmatched".
Is it bcoz of fi. (1 Reply)
hi,
I have this script which gives me the result...
#! /usr/bin/sh
set -x
cd /home/managar
a=1
while true
do
if
then
echo " File log.txt exists in this directory "
exit 0
fi
echo " File has not arrived yes..."
sleep 3
let a=a+1
if
then (1 Reply)
Hi,
I have a script in which an entry like this .....
FILENAME_B="PIC_${DATE}0732*.JPG"
The script connects to an ATM and pull a pic file from it.The format for the file is like PIC_2008061400000001.JPG in the ATM.
Means 1st 8 digit is the date(YYYYMMDD) field
2nd 8 digit means hrs... (2 Replies)
Hi All,
i have an small issue...
echo " "
eval x=$@
export x=`echo $x`
echo $x
ssh user@ipadrss; cd /mbbv/home/;
cd /mbbv/home/orange/orange/
echo pwd
bash samplescript.sh $x
above is my script which will triger from server A and will connect to server B for some... (2 Replies)
Hi all
Here I came accross a situation which i am unable to reason out...
snippet 1
psg ServTest | grep -v "grep" | grep -v "vi" | awk '{
pgm_name=$8
cmd_name="ServTest"
gsub(/]*/,"",pgm_name)
if(pgm_name==cmd_name) { print "ServTest Present =" cmd_name}
}'... (10 Replies)
Hi all,
I need some help in my script...
I need to login into multiple servers from one Unix box and need to login as a superuser account and then I need to perform some actions on the server. For this, i'll use for loop to provide the server names to the script, but for every login as a... (8 Replies)
Hi,
I am new to shell scripting and my below script is not giving result for 2 or more arguments. Can anyone help pls.
#!/bin/sh
sname=$(basename $(readlink -nf $0))
echo "This is $sname, running at $(date)"
echo "It is running on $(hostname)"
echo "Script being run by"
echo " User... (3 Replies)
Why does $0 return the word usage rather than the script name when used in a function?
Baffeled on this one, any help appreciated.
usage()
{
echo "$0 -cs <number of batches>\n"
echo "$0 -c 4"
echo "$0 -s 4"
# echo "-c = Create"
# echo "-s = Submit\n"
exit 1
}
$... (1 Reply)
Hi,
I am a newbie to scripting. I want to know something..Is there any way that I can do this?
Here is the thing.. there are so many printer queues in which i need to change a certain option.. am using the hppi utility and i need to modify the printer configuration individually going to each... (3 Replies)
#!/bin/sh
#!/bin/prel
#set -x
while getopts ":n:t:" opt; do
case "$opt" in
n)
host=$OPTARG
;;
t)
targ=$OPTARG
;;
*)
break
;;
esac
done
if ping -c 2 $host >/dev/null 2>&1
then
echo Host... (17 Replies)
Discussion started by: Vishal_dba
17 Replies
LEARN ABOUT FREEBSD
alarm
ALARM(3) BSD Library Functions Manual ALARM(3)NAME
alarm -- set signal timer alarm
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
unsigned int
alarm(unsigned int seconds);
DESCRIPTION
This interface is made obsolete by setitimer(2).
The alarm() function sets a timer to deliver the signal SIGALRM to the calling process after the specified number of seconds. If an alarm
has already been set with alarm() but has not been delivered, another call to alarm() will supersede the prior call. The request alarm(0)
voids the current alarm and the signal SIGALRM will not be delivered.
Due to setitimer(2) restriction the maximum number of seconds allowed is 100000000.
RETURN VALUES
The return value of alarm() is the amount of time left on the timer from a previous call to alarm(). If no alarm is currently set, the
return value is 0.
SEE ALSO setitimer(2), sigaction(2), sigsuspend(2), signal(3), sleep(3), ualarm(3), usleep(3)HISTORY
An alarm() function appeared in Version 7 AT&T UNIX.
BSD April 19, 1994 BSD