10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I got most of the script working, last part which does the ssh to remote and execute the command not working.
for SSH in ${HostList}; do
echo ${SSH}
echo ""
SSH2SEND=ssh user@${SSH} curl -v $URL
echo $SSH2SEND
done
error message I am getting ... (5 Replies)
Discussion started by: samnyc
5 Replies
2. Red Hat
I am Not sure why following script is not capturing the counts only when using crontab !! when I run it fromt he command line it is fine ! what is missing here !
#!/usr/bin/ksh
host=`uname -n`
tdate=`date`
userid='dbid/password'
totalevents=`sqlplus -s $userid << -
set timing off
... (1 Reply)
Discussion started by: mrn6430
1 Replies
3. UNIX for Dummies Questions & Answers
hi forums, can you help me on how to make cd and mv code work in this script?
#!/bin/ksh
#i got it from: https://www.unix.com/shell-programming-and-scripting/107612-how-tar-compress-remove-files-older-than-two-days.html
MAIN_DIR=/home/user/pumela
find ${MAIN_DIR} *.txt -mtime -3> FILE_LIST... (7 Replies)
Discussion started by: phumaree
7 Replies
4. Shell Programming and Scripting
Hi
I am not able to execute a script with ksh. Its not giving any error too.
I have tried with absolute path /usr/bin/ksh test.sh .
Also checked path variable and all looks fine
It runs fine with sh.
OS is solaris 10. (9 Replies)
Discussion started by: ningy
9 Replies
5. Shell Programming and Scripting
Hi,
I am a bit confused ,why would a sed command work fine outside of ksh script but not inside.
e.g
I want to replace all the characters which end with a value and have space at end of it.
so my command for it is :
sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name
This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies
6. Shell Programming and Scripting
Here's the script:
#!/usr/bin/ksh
Date=`date +%m%d%y`
CDate=`date`
FileName=cintas_hosts_and_users.$Date
echo $CDate >> $FileName
#echo $FileName
for host in `cat /collect/itthomp/cintas_hostnames.dat`
do
echo $host >> $FileName
ssh $host "awk -v Fname=$FileName -F: '{if($1 != "root"... (3 Replies)
Discussion started by: jgt157
3 Replies
7. Shell Programming and Scripting
I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10.
If I do a grep -i version /usr/dt/bin/dtksh I get
@(#)Version M-12/28/93d
@(#)Version 12/28/93
@(#)Version M-12/28/93
This is correct for... (5 Replies)
Discussion started by: thibodc
5 Replies
8. Shell Programming and Scripting
I have a script that works well if i execute manually using informix user. However, it does not execute properly if triggered using the scheduler (ESP). This is the partial part where it doesn't work.
i added some tracing but i can't figure it out.
#!/bin/ksh
let db_is_up=0... (6 Replies)
Discussion started by: tungaw2004
6 Replies
9. UNIX for Advanced & Expert Users
I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command.
I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the
the awk command statement shown here. Please help.
... (6 Replies)
Discussion started by: tekline
6 Replies
10. UNIX for Advanced & Expert Users
Hello,
I am working on HP-UX , and in the /etc/hosts file we have setup an alias:
aa.bb.cc.dd devmach2.unix.org devmach2 devma2v
The alias devma2v does not work. Error when pinging devma2v
ping: unknown host devma2v
For devmach2 the ping works fine , returning the correct IP... (4 Replies)
Discussion started by: FunnyCats
4 Replies