Search Results

Search: Posts Made By: oombera
133,544
Posted By oombera
Try this:#!/usr/bin/sh _curTime=`date +%H%M` ...
Try this:#!/usr/bin/sh
_curTime=`date +%H%M`
if [ _curTime -lt 2400 ] && [ _curTime -gt 0800 ]
then
echo "$_curTime"
fiSee the man page for test for more info:n1 -eq n2 True if the...
14,967
Posted By oombera
Try: sed 's/PROD.*$/TEST/g' < FILE > NEWFILE ...
Try: sed 's/PROD.*$/TEST/g' < FILE > NEWFILE

The thing you have to remember is that with sed, the asterisk doesn't mean "one or more characters" - it means "one or more of whatever character comes...
123,297
Posted By oombera
This is a continuation of this post...
This is a continuation of this post (https://www.unix.com/showthread.php?s=&threadid=10131).

You can use this if you use ksh:

someVar=`awk '{ printf $2 ";" }' file`; someVar=${someVar%;}
...
460,821
Posted By oombera
The directory has to be empty to use the rmdir...
The directory has to be empty to use the rmdir command.. you can use rm yourdir/*; rmdir yourdir

Or you can use rm -r yourdir, but be careful. This is recursive, so all the files in yourdir will...
37,690
Posted By oombera
Well if you can alter the script that's passing...
Well if you can alter the script that's passing the parameter, you could change the piece of code, such as date +%Y%j, so that it sends what you want it to send, such as date +%Y%m%d.

Otherwise......
Showing results 1 to 5 of 5

 

Featured Tech Videos

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