04-29-2011
I dont think the reason for this due to different o.s. actually it can be differ for when used in different shells or shell versions.
Try `which ksh` and compare version of kshs.
In your script, has used pipes. Maybe because of this, cause get different output in debug mode when in some kshs,
it writes as output it with unordered in ksh own internal buffer which probably caughted first command writes firstly it and after then others in pipes commas.
You can try to look output of ksh debug , add `sleep 1` your script after the `ps ..` command.
regards
ygemici
10 More Discussions You Might Find Interesting
1. HP-UX
Hi
I am using HP - UX...
When I execute the below commands I get these results...
Why do i get a different shell value when i run echo $SHELL?
# echo $0
ksh
# echo $SHELL
sh
# ps -p$$
PID TTY TIME COMMAND
4013 pts/7 0:00 ksh (2 Replies)
Discussion started by: gurubarancse
2 Replies
2. Shell Programming and Scripting
I am using a piece of code which is working fine in some cases and is not working in some other instances. All I am doing is grep'ing and concatenating.
Below is a working scenario.
$ echo $var1
REPLYFILENAME=Options_NSE1.txt.enc
$ FILE_NM=`echo ${var1##*=}`.gz (Take everything after... (1 Reply)
Discussion started by: jamjam10k
1 Replies
3. UNIX for Advanced & Expert Users
Hi
I'm executing a menu script in which I `cat a file` but it's giving different output some times. Following is the code fragment taken from my script.
while true
do
cat procs.configured
echo ---------separator--------------
sleep 3
done
when I execute this code fragment, `cat` outputs... (2 Replies)
Discussion started by: axes
2 Replies
4. Shell Programming and Scripting
I have an input list of:
I am just trying to turn this list into its seconds since epoch "+%s" time equivalent. I'm trying to use the following, but every time I run the command it gives me different answers, they are close, but never the same... any clues as to why?
xargs -I{} date -j -f... (3 Replies)
Discussion started by: mdlloyd7
3 Replies
5. Shell Programming and Scripting
Hi,
I have a file that has inconsistently numbered columns.
Like row1 has 23 columns, and row 2 has 34 columns etc.
I would like to re-order the first 8 columns as required and from the 9th column till the end, I would like to print it as it is.
I tried to read the re-ordered 8 columns... (7 Replies)
Discussion started by: jacobs.smith
7 Replies
6. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
7. UNIX for Advanced & Expert Users
Hi Experts,
I have an issue with performance of oracle, the db sits on EBS volumes on and aws EC2 instance. I have captured the iostat data and feed it to iostat_plotter to forward it to the DB administrators. However what I'm trying to understand is the variable avgrq-sz, it is quite in... (0 Replies)
Discussion started by: maverick_here
0 Replies
8. Shell Programming and Scripting
Hi Gurus,
I have requirement to compare current result with previous reuslt.
The sample case is below.
1 job1 1
1 job2 2
1 job3 3
2 job_a1 1
2 job_a2 2
2 job_a3 3
3 job_b1 1
3 job_b2 2
for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies
9. UNIX for Advanced & Expert Users
On one of the Unix server B.11.31. a disk that has been provisioned from the VMAX, but according to the diskinfo its show coming from clarion.
sudo /opt/emc/SYMCLI/bin/symvg sho /dev/vg_<name>
Volume Group Name : /dev/vg_<name>
Volume Group Type : HP-UX LVM
Volume Group State ... (0 Replies)
Discussion started by: kpatel786
0 Replies
10. UNIX for Beginners Questions & Answers
Could you please advise on the following: I have two space-delimited files with 9 and 10 columns, respectively, with exactly the same values in column 1. However, the order of column 1 differs between the two files, so I want to sort both files by column 1, so that I can align them and... (6 Replies)
Discussion started by: aberg
6 Replies