Search Results

Search: Posts Made By: andysensible
2,597
Posted By andysensible
Thanks for the feedback, I am almost there with...
Thanks for the feedback, I am almost there with it... I think I have a solution regarding the serial number.

can i set a default value for the serial number or last seen var if its null?
...
2,597
Posted By andysensible
when I print the time diff in my if then I want...
when I print the time diff in my if then I want to display in minutes in my echo.

so it would be ideal to have the display in minutes in the echo

if [[ "$timediff" -eq 0 || "$timediff" -lt...
2,597
Posted By andysensible
date
Can I substitute seconds with minutes in the date command?


timediff=$(( $(date +%m) - $(date +%m -d$lastseen)))


.
2,597
Posted By andysensible
XML output
The xml looks like this (I blocked out the sensitive bits) I am using grep to get the last seen value.
...
2,597
Posted By andysensible
$lastseen variable
what I was trying to do with the $last seen was to account for any output other then a number or null output. I guess my logic is incorrect.

Is there a way I can combine the whole curl command...
2,597
Posted By andysensible
First script in a long time
I was wondering if I could get some feedback on my script to grab time from our MDM... I blocked out all of the important stuff. I really appreciate any guidance, since I am long out of practice.
...
1,982
Posted By andysensible
Parsing null or empty output
I am working an some if then statements for a script.

I want to be able to check for alpha characters or empty out put then exit out.

if [[ $lastseen = [A-Z] ]];
echo "Serial Number Invaild"...
Showing results 1 to 7 of 7

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