Search Results

Search: Posts Made By: hanton
6,391
Posted By hanton
I am working on a develpment box but it is in a...
I am working on a develpment box but it is in a shared envrironment so I doubt the admins will play around with internal UTC settings (?)

if Virtual Box is not to hard to set up I will give that a...
6,391
Posted By hanton
Thanks for replying. I am trying to test...
Thanks for replying.

I am trying to test some logic that relies on the unix date being the last calendar day of the month. Obviously if I run this now the system date will be Dec 7 2009 - I want...
6,391
Posted By hanton
Set system date to some date (Sunos)
I am testing a script and need to change the system date to Nov 30 2009. I cannot seem to find a way to do this other than TZ command but it does not seem to work correctly.

I tried TZ=GMT+168...
1,618
Posted By hanton
thanks...just wondering but is != illegal syntax...
thanks...just wondering but is != illegal syntax because I do not get any errors - it just does not return the correct result.
1,618
Posted By hanton
if [[ $error4 != "0" ]] ; then
....
error=`cat ${logfile} |grep "OK" |grep -v grep |wc -l`
error4=`cat ${logfile} |grep "ERROR" |grep -v grep |wc -l`
echo ${error4}
echo ${error}
....
if [[ $error4 != "0" ]] ; then
exit 7 ...
9,296
Posted By hanton
Thanks!
Thanks!
9,296
Posted By hanton
determine last day of the month
In a ksh script how do I determine if I am on the last day fo the month ?

thanks
18,920
Posted By hanton
I am on SUNos so I use sed The file is...
I am on SUNos so I use sed

The file is created by an external source. The external source is suppoed to create the file in DOS format but for some reason sometimes they are introduce an extra 0D....
18,920
Posted By hanton
I think I got it - please confirm my...
I think I got it - please confirm my understanding. When I open the file in vi I only see 1 ^M. In ultraedit I see what looks like 2 carriage returns 0D 0D.

tr -d '\015' < filename > o.txt
...
18,920
Posted By hanton
I tried this and it does not have any effect on...
I tried this and it does not have any effect on the file

sed 's/\r\r$/\r/' filename > o.txt

I opened my filename in vi and I can see one ^M. when I open in ultraedit I see 0D 0D 0A at the end...
18,920
Posted By hanton
replace \r\r\n with \r\n
I am having a dificult time trying to replace 2 carriage returns and 1 newline with 1 carriage return and 1 newline in a file. The file may come as CR NL in which case I need to leave it as is. ...
3,308
Posted By hanton
tried to run this and got sed: command...
tried to run this and got

sed: command garbled: /== START/,/== END/{/START/{h;D};H};${x;p}
3,308
Posted By hanton
great tested and workls! now can I output the...
great tested and workls! now can I output the results to a variable in my ksh script then cat grep for the word ERROR ?
3,308
Posted By hanton
search file between last occurence of 2 strings
I need to extract the last block of /== START OF SQLPLUS ==/ and /== END OF SQLPLUS ==/. The logifle is written to several times in a day using >> to append. I need a solution using grep/sed.

...
Showing results 1 to 14 of 14

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