Display Message Question - Page 2 | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Display Message Question

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #8  
Old 12-06-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 22 December 2014, 3:02 AM EST
Location: Simplicity
Posts: 2,090
Thanks: 141
Thanked 613 Times in 556 Posts
This works in any shell but C-shell and with most time zones:

Code:
today=`date "+%b %e"`
yesterday=`TZ=$TZ+24 date "+%b %e"`
dmesg | egrep "^($today|$yesterday) "

Sponsored Links
    #9  
Old 12-10-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 22 December 2014, 6:40 AM EST
Location: Lancashire, UK
Posts: 1,940
Thanks: 636
Thanked 338 Times in 306 Posts
What shell are you running in? If you are not sure, you can confirm this with the output of the command ps -f

You error suggests you are not in bash or ksh, so we need to be sure first.


Robin
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Refrain the Message of File Not exists display out ckwan Shell Programming and Scripting 3 11-27-2013 05:14 AM
Display a message if the server is prompting urfrnddpk Shell Programming and Scripting 0 06-14-2011 03:49 AM
Script that will display a short message jmack123 UNIX Desktop for Dummies Questions & Answers 2 04-16-2010 07:58 PM
How do display a warning message? kris2010 Shell Programming and Scripting 4 03-25-2010 11:56 AM
How to display message when starting a terminal mrudula009 Shell Programming and Scripting 27 06-17-2009 07:41 AM



All times are GMT -4. The time now is 08:42 AM.