Print the current time on the whole screen, updated every second

while(true); do printf "%s\f" $(date +%T); sleep 1; done | sm -
http://www.joachim-breitner.de/projects#screen-message now also supports reading stdin continuously to update what it shows, different ?slides? separated by a form feed character. Here, we feed the current time into it each second to create a large clock.

1
By: claudius
2013-01-14 17:13:34

These Might Interest You

  • Personally, I save this in a one line script called ~/bin/sci: #!/bin/bash for pid in `screen -ls | grep -v $STY | grep tached | awk '{print $1;}' | perl -nle '$_ =~ /^(\d+)/; print $1;'`; do screen -x $pid; done I also use: alias scx='screen -x' alias scl='screen -ls | grep -v $STY'


    0
    for pid in `screen -ls | grep -v $STY | grep tached | awk '{print $1;}' | perl -nle '$_ =~ /^(\d+)/; print $1;'`; do screen -x $pid; done
    tmsh · 2010-06-22 23:06:31 0
  • Provides a recursive time ordered list of the current directory over the last 3 minutes. Excluding zero byte files: ls -lF -darth `find . -size +0 -mmin -3` For the last day's files, change "-mmin -3" to "-mtime -1": ls -lF -darth `find . -size +0 -mtime -1` Show Sample Output


    -2
    ls -lF -darth `find . -mmin -3`
    UncleLouie · 2014-03-22 16:52:20 0
  • By default, screen tries to restore its old window sizes when attaching to resizable terminals. This command is the command-line equivalent to typing ^A F to fit an open screen session to the window.


    12
    screen -raAd
    rkulla · 2010-04-12 22:54:58 1
  • A cronjob command line to email someone when a webpages homepage is updated.


    2
    cd /some/empty/folder/website_diffs/sitename && wget -N http://domain.com/ 2>&1 |grep -q "o newer" || printf "Sites web page appears to have updated.\n\nSuggest you check it out.\n\n"|mail -s "Sites page updated." david@email.com
    DaveQB · 2010-05-09 07:28:42 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: