10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi,
I tried the following but giving me all the files in the directory ,
Where i need the files which are assigned to variable like below
#!/bin/ksh
Src_Dir="/home/etc"
file_nm ="ab.temp"
for File in `ls $Src_Dir/$file_nm*`
do
File=`basename $File`
echo $File
... (2 Replies)
Discussion started by: smile689
2 Replies
3. 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
4. Shell Programming and Scripting
Dear All,
We are having the script which is creating the folder on another server if it is not present using ssh. Using scp it copies copy all pdf files from local folder to server folder.
After all copy is done, Just to verify i was using the below find command
find... (3 Replies)
Discussion started by: yadavricky
3 Replies
5. Shell Programming and Scripting
Hi,
I want to parameterise the argument for 'mmin' to find out files created/edited 'n' minutes ago.
For this i have written something as simple as the following:
n=10
m=-1
c=expr $n \* $m #value comes to -10 when echoed
find -mmin -10 #works
find -mmin $c #doesnt work ... (5 Replies)
Discussion started by: SheetalN
5 Replies
6. Shell Programming and Scripting
#! /bin/ksh
rm -f ./xyz file --- this line is working
// Below any if stmt is not working.
if
then
echo " blah blah "
fi
or I replaced above if with
if
then
echo "dir exists"
fi
This is also not working.
I am new to KSH. So can someone help why if stmt is not... (31 Replies)
Discussion started by: saggy9583
31 Replies
7. Shell Programming and Scripting
I need to compare the time a file was last modified against current time and conditionally proceed.
At the command prompt I can do:
find MYFILE -mmin +1140
and it lists the file. But I need to test, and if true do something
I’ve tried things like:
if ; then
if ; then
etc. ... (2 Replies)
Discussion started by: tlavoie
2 Replies
8. AIX
Hi,
I have a strange problem with a AIX server, user are having problem with using du will in their ksh shell, if they switch to sh or bash there is not problem. root account that are using ksh but have not problem with du.
this is the error messages when trying to run du
du: can't find... (5 Replies)
Discussion started by: robertngo
5 Replies
9. Solaris
Hi,
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution... (3 Replies)
Discussion started by: arsheshadri
3 Replies
10. AIX
Following code is working in bash but not in ksh.
Can someone please send me an alternative?
#!/bin/ksh
fname="EOA.dmp"
echo $fname
logname=${fname/.dmp/.log}
echo $logname
I am getting below error in ksh
"testcmd: logname=${fname/.dmp/.log}: 0403-011 The specified substitution is not... (2 Replies)
Discussion started by: arsheshadri
2 Replies