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: 29 October 2014, 3:16 PM EDT
Location: Simplicity
Posts: 1,991
Thanks: 129
Thanked 583 Times in 528 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: 24 October 2014, 3:13 PM EDT
Location: Lancashire, UK
Posts: 1,869
Thanks: 599
Thanked 322 Times in 290 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 04:14 AM
Display a message if the server is prompting urfrnddpk Shell Programming and Scripting 0 06-14-2011 02:49 AM
Script that will display a short message jmack123 UNIX Desktop for Dummies Questions & Answers 2 04-16-2010 06:58 PM
How do display a warning message? kris2010 Shell Programming and Scripting 4 03-25-2010 10:56 AM
How to display message when starting a terminal mrudula009 Shell Programming and Scripting 27 06-17-2009 06:41 AM



All times are GMT -4. The time now is 10:25 AM.