Sponsored Content
Top Forums Shell Programming and Scripting Is it possible to combine these two PS1 examples? Post 302638009 by Chubler_XL on Wednesday 9th of May 2012 06:31:22 PM
Old 05-09-2012
Try this:

Code:
date '+%H %M %S' | read H M S
SECONDS=$((S + 60*(60*H+M)))
PS1='${DUMMY[((S=(100+$SECONDS%60))+(M=(100+($SECONDS/60)%60))+(H=(100+($SECONDS/3600)%24)))*0]:-}'$(printf "\033[46;31m%s@\033[1;33m%s:\033[1;34m\$PWD \033[0m \033[1;33m\${H#1}:\${M#1}:\${S#1}\033[0m \$" $(logname) $(hostname))

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

looking for .profile examples

I'm looking for some 'well documented' .profile examples (8 Replies)
Discussion started by: JimC
8 Replies

2. Shell Programming and Scripting

need examples?

Can someone give me an example of two shells? (1 Reply)
Discussion started by: wmosley2
1 Replies

3. Red Hat

redhat-release examples

I have a script that checks the redhat-release file to determine what security patch needs to be applied. Since there's a Red Hat 5 now, I need a redhat-release file from the various platforms (Desktop, Enteprise Workstation, and Enterprise Server) so I can build a proper search string. Also, it... (5 Replies)
Discussion started by: BOFH
5 Replies

4. UNIX for Advanced & Expert Users

Most useful Unix commands and Examples

These commands are placed in the MS Word Doc. with command options and the their respective examples. hope this will help for the beginners. Thanks. Varun Gupta:D (2 Replies)
Discussion started by: varungupta
2 Replies

5. UNIX for Dummies Questions & Answers

SimpleAWK Examples

Can Anyone please give me some simple AWK Examples to clearly understand the usage and syntax of the command. Thanks (2 Replies)
Discussion started by: unxusr123
2 Replies

6. Emergency UNIX and Linux Support

Awk and Sed examples

Hi all, I tried to understand what this awk and sed does but cudnt understand. Can any body explain what awk and sed means with one simple example each and complex examples each with explanation. Thanks in advance. (7 Replies)
Discussion started by: j_panky
7 Replies

7. UNIX for Advanced & Expert Users

Hard Link Examples

Hello, Please move this if I chose the wrong forum category. This question pertains to Unix and Linux I believe. I google the difference between hard and symbolic/soft links and I understand the difference. What I am trying to find is a real example of a hard link being used in a Operating... (11 Replies)
Discussion started by: jaysunn
11 Replies

8. Shell Programming and Scripting

lwp-request examples

Hi; Can i have ne sample examples of of using " lwp-request" in shell script. Is it necessary to have perl installed already in linux box for using this; Thnks; (2 Replies)
Discussion started by: ajaypadvi
2 Replies

9. Programming

Examples, usage, help in C++ program

I have written a C++ program to perform raytracing and would want to write some functions to help the user: examples, usage, help I am wondering how this is done. Would I just put some functions in the main program? (4 Replies)
Discussion started by: kristinu
4 Replies

10. Shell Programming and Scripting

Need lot of examples

Hi, I need a word doc or pdf which contains lots of Shell Programming samples... This is for my open book examination, thanks in advance.. (2 Replies)
Discussion started by: karthikeayan
2 Replies
ISDND.ACCT(5)						      BSD File Formats Manual						     ISDND.ACCT(5)

NAME
isdnd.acct -- isdn4bsd ISDN management daemon accounting file format DESCRIPTION
The file isdnd.acct contains accounting information which is written if the variable useacctfile in the isdnd(8) configuration file isdnd.rc(5) is set to on and charging information transmission has been subscribed for the ISDN connection (AOCD or AOCE). If the variable acctall is set to on, accounting information is written even if the local site was not charged or no charging information is available or is not subscribed. The general format of an accounting line is as follows: FROM - UNTIL NAME UNITS (SECONDS) (INBYTES/OUTBYTES) FROM is the time the connection was established in the format Day.Month.Year Hour:Minutes:seconds UNTIL is the time the connection was closed. The format is the same as described for FROM above. NAME is the symbolic name got from the name entry of the isdnd.rc(5) config file for this connection. UNITS is the amount of charging units billed for the connection. SECONDS is the number of seconds the connection lasted. INBYTES and OUTBYTES is the (optional) number of bytes that were transferred. FILES
/var/log/isdnd.acct The default accounting information file for the isdnd ISDN daemon. EXAMPLES
This is a typical accounting line: 12.06.97 10:41:37 - 12.06.97 10:45:18 GROGGY 2 (65) (4711/1147) SEE ALSO
isdnd.rc(5), isdnd(8) AUTHORS
The isdnd(8) daemon and this manual page were written by Hellmuth Michaelis <hm@kts.org>. BSD
September 11, 1998 BSD
All times are GMT -4. The time now is 05:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy