I am currently in the process of testing upgrading from Solaris 8 to Solaris 10.
one problem i have encountered is when i am running any of my batch scripts.
All my scripts start with #! /bin/ksh so that they will excuted in the ksh shell.
but the scripts will not run correctly. The enviroment varibales are
As you can see i am using the pfksh as my default shell, This is the same as on my solaris 8 box.
How can i get my ksh scripts to run correctly on the pfksh shell, should i change my deafult shell?
Moderator's Comments:
Use code tags please.
---------- Post updated at 06:52 AM ---------- Previous update was at 05:59 AM ----------
after further investigation, it appears that there is a difference between the ksh on solaris 8 and Solaris 10. i copied the ksh from 8 to 10 and the scripts run fine. put back the original ksh and the scripts stop working.
so something has changed in the ksh between 8 and 10.
Solaris 10 ksh is seeing functions defined in a sourced file by design. There must be something specific in your set-up. Can you post a reproducible real example of different behavior observed between Solaris 8 and 10 ksh ?
Hi
Could someone offer some help on this problem I've got with running a background process.
As part of a script that does a stop/start/status for a piece of software called SAS, the following extract is from part of the start step.
My issue is that when the script is run, the control... (0 Replies)
I have a machine (IP:192.168.1.185) and i want to send spoofed IP address (e.g. 192.168.1.212) to another machine(192.168.1.213) . I am using a spoofing program for this which uses raw sockets.
Now whenever i pass the parameters(spoofed ip addr and destination) to the output of the program, i... (2 Replies)
set -A allfiles `find $usrhtml -type f`
i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
I have the following ksh code and I am passing
f="npt06-sr40-syn-dc0p02-32x24drw.mis"
For some reason, it's going to the else statement instead of setting
optfdrw=1
smptag=$(print -R $f | awk '/smp/')
drwtag=$(print -R $f | awk '/drw/')
if && ; then # drw tag... (15 Replies)
Hi all, I have a script running on a Solaris 8 box and the first thing it does it check which user is executing it;
if ; then
echo "This script must be run as testuser" 1>&2
exit 1
fi
This works fine when manually running the script however when adding into that users' crontab it... (1 Reply)
Hi,
I'm trying the backup a few information commands of my Check Point FW (it's on a SPLAT linux machine). This is the script I wrote:
#!/bin/bash
cd /var/tmp/
file1=netstat_`/bin/date +%d%m%y`.txt
file2=ifconfig_`/bin/date +%d%m%y`.txt
file3=cpstatos_`/bin/date +%d%m%y`.txt... (2 Replies)
Hi,
I'm using autosys and want to set it up that I receive emails when certain jobs start and finish. I don't want to edit each jobs script (ksh) to send a mail at start and finish, I would rather have a single script/job that watches for a trigger when the jobs have started or finished.
I... (1 Reply)
Hi all,
I'm having a rather peculiar problem involving parameter passing with declared functions in my shell script. Hope to get some advice here.
A brief description of my code is as follows:
However, I'm not getting the results I wanted. If I pass in $rdir, I'm going to end up... (4 Replies)
...so I read "The Pragmatic Programmer" and they stressed the value of learning shell scripting!
I'm in a UNIX environment but have a Windows XP workstation.
I'm using Telnet to issue UNIX commands. I've done plenty of chmod's, command line ftp and stuff, but written no scripts to this point.... (1 Reply)
well i have written a script to telnet and ftp to all my servers, the script runs great, BUT i can not for the life of me figure out how to get the script to repeat if the conditions are not filled.
this is what i have so far
#########################################
TorF(){
echo T... (4 Replies)