Search Results

Search: Posts Made By: mo_VERTICASQL
1,489
Posted By Don Cragun
Please show us a complete sample log file: ...
Please show us a complete sample log file:
####LOG FILE ###
2014-08-04
$Date=2014-08-04 $hour
$Date2=2014-08-04 $onehourfromnow

variables collected (...)
sumations (....)
totalcolumns(...)...
12,869
Posted By Don Cragun
Some people may suggest calling date twice, but...
Some people may suggest calling date twice, but if you do that just before and just after a change in the minute, the two values won't be related the way you want them. (As a close to worst case,...
1,489
Posted By LoneRanger
Don't you understand he is unable to think a way...
Don't you understand he is unable to think a way out. If he could write the code why would he come to ask for help. He has an idea but not the necessary coding skills. So all is he asking for some...
964
Posted By Corona688
You can get exactly what you asked for with ...
You can get exactly what you asked for with

$ VAR=$(date +"%F %H:%M.%s")
$ echo ">> ${VAR:0:23}"
>> 2014-08-01 14:23.140692 ...but I have my doubts that's what you actually want.

What,...
2,220
Posted By Corona688
You might want to comment out the echo inside...
You might want to comment out the echo inside that loop before deploying. I'm not sure where all those debug statements will end up, if anywhere. Don't want them piling up in some neglected logfile...
2,220
Posted By Corona688
$! is the process ID of whatever you backgrounded...
$! is the process ID of whatever you backgrounded (i.e, ran with &) most recently inside the current shell.

So if you did ( .... ) & you would get the process ID of the subshell.

If you did...
2,220
Posted By Corona688
Again, I'm not sure what 'kill -- -$$' is even...
Again, I'm not sure what 'kill -- -$$' is even trying to do. -- is not a valid option for kill, and killing your own shell would kill everything, leaving it not able to do anything. And -(number)...
2,220
Posted By Corona688
( echo "Hi!" # Slow thing ) &...
(
echo "Hi!"
# Slow thing ) &

PID="$!"

for X in 1 2 3 4 5
do
ps "$PID" >/dev/null 2>/dev/null || break
sleep 1
done

if ps "$PID" >/dev/null 2>/dev/null...
Showing results 1 to 8 of 8

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