Search Results

Search: Posts Made By: heprox
2,161
Posted By heprox
I comes back as "2"? x-4-1-user# dw_test ...
I comes back as "2"?


x-4-1-user# dw_test
2
x-4-1-user#
2,161
Posted By heprox
I thought the same thing, but I always get "echo...
I thought the same thing, but I always get "echo "More than one instance of the DW Manager is running" message? Indicating that it is counting more than one line....
2,161
Posted By heprox
Counting Processes
I have a simple script that I want to notify me whenever there are anything other than one instance of a particular process running. I've always used the script:

DPID_DW=$(ps -ef | grep [d][w] |...
143,171
Posted By heprox
Have a shell script call another shell script and exit
I have a shell script that calls another shell script "str_process_main" that runs in a loop until a given time. I want the first script to just call the second one and then exit. The first script...
2,638
Posted By heprox
I got it to log correctly by having it validate...
I got it to log correctly by having it validate the existance of the input file again before sending it to the "is_file_arrived" function:


#!/bin/ksh
######### Environment Setup #########...
2,638
Posted By heprox
I also tried to just stop the string...
I also tried to just stop the string "/gers/genret/datafiles/[Uu][Pp][Ll][Oo][Aa][Dd].[0-9][0-9][0-9][0-9]" from being passed to the "is_file_arrived" function and thus it wouldn't get logged:

...
2,638
Posted By heprox
I replaced the "for in" loop but it didn't...
I replaced the "for in" loop but it didn't process the files correctly, the section now looks like:


nsec=1
while [[ "$(date +%H%M)" -lt 2340 ]]
do
ls...
2,638
Posted By heprox
Writing to a log file incorrectly
I have this script:


#!/bin/ksh
######### Environment Setup #########
PATH=/gers/nurev/menu/pub/sbin:/gers/nurev/menu/pub/bin:/gers/nurev/menu/pub/mac...
3,422
Posted By heprox
I see the problem the "$arrived" variable is a...
I see the problem the "$arrived" variable is a local variable to the "is_file_arrived" function:


#!/bin/ksh
######### Environment Setup #########...
3,422
Posted By heprox
I just got my mistake, I was missing the ";"...
I just got my mistake, I was missing the ";" after the brackets. Now I'm getting a different error:


+ nsec=1
+ date +%H%M
+ [[ 0102 -lt 2340 ]]
+ fileExtension=0004
+ is_file_arrived...
3,422
Posted By heprox
This is what I have: nsec=1 while [[...
This is what I have:


nsec=1
while [[ "$(date +%H%M)" -lt 2340 ]]
do
for fileName in $DatafilesDir/[Uu][Pp][Ll][Oo][Aa][Dd].[0-9][0-9][0-9][0-9]
do
fileExtension=${fileName#*.}
...
3,422
Posted By heprox
I tried added that and got: ...
I tried added that and got:


test_str_process[70]: 0403-057 Syntax error at line 81 : `else' is not expected.
3,422
Posted By heprox
What is wrong with this script?
I keep getting errors messages for the "else" statement at line 81?


#!/bin/ksh
######### Environment Setup #########...
54,417
Posted By heprox
I ended up using something similar with: ...
I ended up using something similar with:


#!/bin/ksh
######### Environment Setup #########
PATH=/gers/nurev/menu/pub/sbin:/gers/nurev/menu/pub/bin:/gers/nurev/menu/pub/mac...
43,428
Posted By heprox
You lost me....
Forgive my ignorance, so how would bracketing the "-a" work?


[[ -a /gers/genret/tmp/poll_$fileExtension.txt ]] && continue


...it would check for the file "poll_" and if it found it stop...
43,428
Posted By heprox
Have a shell script check for a file to exist before processing another file
I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files...
54,417
Posted By heprox
Help with a shell script for creating a log file
I have a schell script that runs continously on an AIX system. It is actually started from another shell script with the "ksh -x" command and then I just write the output to a log file. This causes...
21,819
Posted By heprox
Script to check processes and send an email
I searched through the forum and couldn't quite find what I was looking for. I have a script that looks for a process "DW" to be running. If it is not it will email a notice to an account. I would...
11,410
Posted By heprox
Modify script to generate a log file
I've seen several examples of scripts in thise forum about having a script generate a log file. I have a script that is run from cron and that monitors a file system for a specfic filename(s) and...
Forum: AIX 06-12-2006
4,618
Posted By heprox
The syntax for: ...
The syntax for:

/datafiles/[Uu][Pp][Ll][Oo][Aa][Dd].[0-9][0-9][0-9][0-9]

...was exactly what I was looking for, thanks. Worked like a charm.
Forum: AIX 06-10-2006
59,100
Posted By heprox
Good idea...thanks.
Good idea...thanks.
Forum: AIX 06-10-2006
4,618
Posted By heprox
Script to perform some actions on multiple files
I have this Korn script that I wrote (with some help) that is run by cron. I basically watches a file system for a specific filename to be uploaded (via FTP), checks to make sure that the file is no...
Forum: AIX 06-07-2006
59,100
Posted By heprox
Got it working with: #!/bin/ksh ...
Got it working with:

#!/bin/ksh

used_space=0
mount_point=${1:-"/arch_nb"}
threshold=${2:-65}

used_space=`df -k $mount_point | grep -v "^Filesystem" | awk {'print $4'} |sed '
s/%//'`...
Forum: AIX 06-07-2006
59,100
Posted By heprox
When I run the command: df -k $mount_point |...
When I run the command:

df -k $mount_point | grep % | awk {'print $5'} | sed 's/%//g'

...assuming I assign the value of "/tmp" to "$mount_point" I get:

x-4-1-test# df -k /tmp | grep % | awk...
Forum: AIX 06-07-2006
59,100
Posted By heprox
I changed the script to: #!/bin/ksh ...
I changed the script to:

#!/bin/ksh

used_space=0
mount_point=${1:-"/tmp"}
threshold=${2:-10}

used_space='df -k $mount_point | grep % | awk '{print $5}' | sed 's/%//g''
print "Free Space...
Showing results 1 to 25 of 32

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