![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-20-2007 01:52 AM |
| Debian: doubt in "top" %CPU and "sar" output | jaduks | Debian | 0 | 09-12-2007 09:05 AM |
| a weird issue with "while" block | sleepy_11 | Shell Programming and Scripting | 7 | 08-07-2007 12:33 AM |
| Sorting problem "sort -k 16,29 sample.txt > output.txt" | ganapati | Shell Programming and Scripting | 3 | 08-01-2006 06:55 AM |
| Unix "at" / "Cron" Command New Problem...Need help | Mohanraj | UNIX for Dummies Questions & Answers | 3 | 01-26-2006 08:08 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Weird problem with output from "date '+3600*%H+60*%M+%S' "
Hi,
I came across a script a few months ago that allowed you to use the following script to include the current time into your prompt (useful from auditting purposes): Code:
# Set Prompt
typeset -RZ2 _x1 _x2 _x3
let SECONDS=$(date '+3600*%H+60*%M+%S')
_s='(_x1=(SECONDS/3600)%24)==(_x2=(SECONDS/60)%60)==(_x3=SECONDS%60)'
TIME='"${_d[_s]}$_x1:$_x2"'
export PS1=${TIME}'${ME}:${PWD}:[$QM]# '
Code:
09+60*53+48: 0403-009 The specified number is not valid for this command. or 09+60*59+31: 0403-009 The specified number is not valid for this command. Anyone know what the problem might be? Gareth |
|
||||
|
Thanks, that worked. What's confusing me is why this script works in its original form before 10am on some servers but not on others. What should I check to see what's different between these servers and how do I check that?
Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|