Unix/Linux 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 Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 12-06-2013
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 24 August 2016, 3:39 AM EDT
Location: Simplicity
Posts: 3,194
Thanks: 248
Thanked 1,025 Times in 926 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 Unix and Linux 12-10-2013
rbatte1 rbatte1 is offline Forum Staff  
Moderator
 
Join Date: Jun 2007
Last Activity: 22 August 2016, 7:40 AM EDT
Location: Lancashire, UK
Posts: 2,588
Thanks: 965
Thanked 468 Times in 423 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 Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 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 06:25 AM.