Search Results

Search: Posts Made By: OFFSIHR
6,294
Posted By OFFSIHR
It was very interesting for me to look at your...
It was very interesting for me to look at your code Perderabo. I also took a modular approach. Thank you
6,294
Posted By OFFSIHR
what's the largest shell script you've ever written?
I've just written a test harness using ksh.

One of scripts weighed in at 1206 lines.

I came across Eric Raymonds 'Art of Unix programming' on line and he advises against excessively large...
5,150
Posted By OFFSIHR
thanks for your reply Deal_NoDeal. The...
thanks for your reply Deal_NoDeal.

The problem I'm getting is that I get 0.0 returned for all my %CPUs. AARGH!
I decided to use vmstat not mpstat as wasn't that interested in by processor just...
2,122
Posted By OFFSIHR
finger - who's on at the moment /etc/password -...
finger - who's on at the moment
/etc/password - who has access
4,808
Posted By OFFSIHR
I'd do it your way and test the return code from...
I'd do it your way and test the return code from the previous script eg

ksh ./k1.sh

if [ $? -ne 0 ] ; then
TestRunResult=fail
...
2,912
Posted By OFFSIHR
You are inovking your script from the current...
You are inovking your script from the current working directory using ./
The other command could be picking up something from the path

I have run your script under bash and ksh and not got this...
5,150
Posted By OFFSIHR
Thanks for your command Sysgate it seems I get a...
Thanks for your command Sysgate it seems I get a lot of old processes that are hanging around such as

00:04:25 root Feb28 0.0 6245 1 ? /opt/IBM/db2/V8.1/bin/db2fmcd
00:03:55...
4,458
Posted By OFFSIHR
you're welcome. sometimes it's easier when...
you're welcome.
sometimes it's easier when someone else does a cut down.
I'm guessing short circuit evaluation meant the whole expression wasn't evaluated
...
4,458
Posted By OFFSIHR
mmmmm you're right the exit should follow I've...
mmmmm you're right the exit should follow
I've just tested it using this
#!/usr/bin/ksh
{
set -x
arg=0
while [[ $arg -le 1 ]]
do
[ -d /cm/uat_releases/riab/uat/2345 ] || mkdir -p...
4,458
Posted By OFFSIHR
have you echoed $? to see what is returned?[ -d...
have you echoed $? to see what is returned?[ -d ${mk_backup_dir[$i]} ] || mkdir -p ${mk_backup_dir[$i]}
echo $?


You could also use debugging
#!/usr/bin/ksh
{
set -x
do
[ -d...
5,150
Posted By OFFSIHR
vmstat returns good val for cpuIdle put ps shows no active process
hi
i'm running a shell script that checks the amount of cpu idle either using /usr/bin/vmstat 1 2 or sar 1 2 (on unixware) before i run some tests(if cpu idle greater than 89 I run them).
...
1,268
Posted By OFFSIHR
block sizess
hi
I'm experiencing disk full errors on one of my boxes and can't unzip an archive that contains tests to execute( last file in zip - a data file is truncated) I've tried df on the box with the...
29,307
Posted By OFFSIHR
i did not understand what NF was, now i do ...
i did not understand what NF was, now i do



NF will solve my problem
thank you vgersh99 you have been very helpful
29,307
Posted By OFFSIHR
yes my print field separator number was wrong :-)...
yes my print field separator number was wrong :-) thanks for explaining it well
I will now put the values in an array, get size of array and from last array value get name of last directory.
I...
29,307
Posted By OFFSIHR
Sorry I have used basename foo2 and it returns...
Sorry
I have used basename foo2 and it returns foo2

I did not see the NF on the end - now I get 6 (yes 6!) returned to this script
dir=/home/foo1/foo2
splitit=`echo $dir | awk -F '/' '{print...
29,307
Posted By OFFSIHR
thank you for reply vgersh99 I am on Linux but...
thank you for reply vgersh99 I am on Linux but '/' returns blank in inline awk

I look at basename, but is it only for directory name that you know already as argument passed?

thanks
29,307
Posted By OFFSIHR
awk / escape character
Hi
I'm trying to split a dir listing
eg
/home/foo1/foo2
I'm using ksh

I've tried
dir=/home/foo1/foo2
splitit=`echo $dir | awk -F '\/' '{print $1}'`
echo $splitit

nothing is output! ...
13,457
Posted By OFFSIHR
ok solved it changed /etc/sysinfo/clock setting...
ok solved it
changed /etc/sysinfo/clock setting to
TIMEZONE="UTC"
DEFAULT_TIMEZONE="UTC"
and rebooted shutdown -r now
13,457
Posted By OFFSIHR
hi sorry for delay in replying SUSE LINUX...
hi sorry for delay in replying

SUSE LINUX Enterprise Server 9 (i586) - Kernel 2.6.5-7.191-default

I have /etc/sysconfig and clock but not setclock

The person who set up this sys originally...
13,457
Posted By OFFSIHR
changing sys clock (PST to UTC)
Hi
I'm trying to change my sys clock from PST to UTC.

I've read the man date page
it helpfully says :-
-u, --utc, --universal
print or set Coordinated Universal Time

as root I have...
2,921
Posted By OFFSIHR
Hi shereenmotor thank you, this works from...
Hi shereenmotor
thank you, this works from command line but does not from within the shell script.
I think i will just implement it differently
thank u for your time
2,921
Posted By OFFSIHR
Hi shereenmotor thank you without redirect...
Hi shereenmotor
thank you
without redirect to txt file i get the dir listing echoed back to me.

when I keep the redirect I get no error message at all and nothing is written to my dirList.txt...
2,921
Posted By OFFSIHR
works from cmd-line but not in script
hi
I'm trying to query a directory, check it's the right directory, return the results into a text file, put text file into an array and navigate the subdirectories and delete contents.

find...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 05:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy