Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: akabir77
888
Posted By akabir77
how to read a certain column from the status result
I am using this script to get the status of the running process

VAR=$(ps -ef | grep batch_proc_x | grep -v grep)
echo $VAR


now it returns this

splgwin 13195 13100 0 14:13:13 pts/tb ...
5,196
Posted By akabir77
How to get the start time for a JAVA Main running process
I have a script that executes a MAIN JAVA FILE

It does check if the process is already running or not by using this code

w_pid=`ps -efx | grep -v grep | grep "FileTransactionArchiveMain...
4,096
Posted By akabir77
how can I check if the VAR is empty or not? I...
how can I check if the VAR is empty or not? I found out that if the process is not running it returns blank or empty.
4,096
Posted By akabir77
how to get start time of a running process
I am trying to see if a process is running what was its start time.

here is the code that I am using


if [ `ps -elf | grep batch_output_x | grep -cv grep` = 0 ]
then
echo 'Gateway output...
2,278
Posted By akabir77
I took out the white space and that error is gone...
I took out the white space and that error is gone but I get the whole formula instead of a number


FTP_SEC=10*24*60+12*60+00


I changed my code as bellow now

FTP_HOUR_SEC=$FTP_HOUR*24...
2,278
Posted By akabir77
How to compare two String Time
I am trying to compare two string time to figure out the difference.

I need to find out the start date of a process is running for over certain minutes.

so far I was able to get the process...
68,421
Posted By akabir77
I can get the date using this RUN_DATE=`date...
I can get the date using this
RUN_DATE=`date '+%m-%y'`

but don't know how to get time
format can be HH:mm:ss (24 hours)
68,421
Posted By akabir77
How to get system time
I am trying to write a script which will compare the start time of a process with the current time. but I am having trouble finding the command to get the current time.
1,335
Posted By akabir77
Thanks now hwo do I get the time out of the...
Thanks now hwo do I get the time out of the result

I am trying like this


VAR=$(ps -ef | grep batch_download_x)
echo "FTP_FILE_DATE $VAR"

FTP_HOUR=$(echo $VAR|cut -c5-2)
...
1,335
Posted By akabir77
ok that makes sense Now I need to see when...
ok that makes sense

Now I need to see when the script has started and figure out if it has been already over say 2 hour.

for getting the running time i run this
ps -ef | grep batch_download_x...
1,335
Posted By akabir77
help with a script
Hi

I am trying to write a script that will email me if one of our other process is bumping into each other.

I just found this code... but not sure what its doing.

The script that runs the...
5,235
Posted By akabir77
Thanks guys I actually used this to solve my...
Thanks guys

I actually used this to solve my problem.

https://www.unix.com/unix-dummies-questions-answers/4870-days-elapsed-between-2-dates.html#post16559
5,235
Posted By akabir77
How to get 4 digit Year using ls -l in HP-Unix
I have this code that loops through a directory and adds all the files it finds in a log file.

# get list of files from FTP server; stores
# 'ls -l' results in $FTP_RESULTS
(
echo user...
Showing results 1 to 13 of 13

 

Featured Tech Videos

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