I learned a few things reading this command. But I did run into a few issues: 1. On systems that don't use GNU echo (e.g. macOS 10.14.5 Mojave), the e option may not be supported. In this case ANSI escape codes will echoed as text and the terminal will not flash, like this: \e[?5h\e[38;5;1m A L E R T Thu Jun 20 16:31:29 PDT 2019 2. Since the read command strips\ignores leading backslashes, if a user types the backslash character once in the loop, it will not break. Typing backslash twice in a loop will break as expected. 3. The foreground color is set to red (\e[38;5;1m) on every loop. This could be set once before we call while, and then reset once when the loop breaks. 4. Instead of resetting the foreground color when it breaks, the video mode is set back to normal (\e[?5l). This has the effect of leaving the terminal text red until it is manually reset. The alternative I'm proposing here addresses these issues. I tested it on macOS and Arch Linux. Show Sample Output
https://wuseman.nr1.nu:8080/file/E8AcLVgMPZ2LSJQf/9BD8V8ADYNhR6cca/parallel_print_progress.gif Show Sample Output
The effect is achieved by moving odd-numbered lines from right to left and even-numbered lines from left to right. For odd-numbered lines (with an index j), the ((j + i) % 2 == 0) condition is satisfied. In this case, the line width is set to i, resulting in the line moving from left to right. For even-numbered lines, the ((j + i) % 2 == 0) condition is not satisfied. The line width is set to $(tput cols) - i, causing the line to move from right to left. This alternating direction of movement creates a twisted visual effect as the lines appear to move in opposite directions. The code runs in a continuous loop, repeatedly updating the lines with changing background colors. There is a slight pause of 0.05 seconds between each iteration to control the speed of the animation.
plays wave file after 3 minutes
Handy if all you have is a console session or tty. Show Sample Output
the command for the impatient sysadmin: simply checks every five secs, if a host or a specific service running on it is up. ideal for hosts that are configured not to respond on pings. Show Sample Output
Log a command's votes,
then run:
gnuplot -persist <(echo "plot 'votes' with lines")
Mostly for Norwegians, but easily adoptable to others. Very handy if you are brainstorming for a new domainname. Will only display the available ones.. You can usually do this better with dig, but if you dont have dig, or the TLD only have an online service to check with, this will be usefull.. Show Sample Output
This will record the Alexa Traffic Stats to a file and run every 5 hours. -- www.fir3net.com --
This command will play back each keystroke in a session log recorded using the script command. You'll need to replace the ^[ ^G and ^M characters with CTRL-[, CTRL-G and CTRL-M. To do this you need to press CTRL-V CTRL-[ or CTRL-V CTRL-G or CTRL-V CTRL-M.
You can adjust the playback typing speed by modifying the sleep.
If you're not bothered about seeing each keypress then you could just use:
cat session.log
Show Sample Output
With progress bar.. hahaa this is friggin' kludge Show Sample Output
Requires the xautomation package. Show Sample Output
Thank You, hackerb9!
can also be invoked as 'exipick -zi | exim -dM' if you do not need/want the delay between flushes.
Of course, a fifo is required for piloting the fade out of another song, but with a few bash function, we can mix music in bash like : crossfadeIn > mplayerfifo1 & crossfadeOut > mplayerfifo2 loop 0 10 > mplayer fifo1 etc etc
I used curl instead of lynx. Show Sample Output
Does the same but without a pipe and a new shell.
requires sp-auth installed This command will auto kill sp-sc after vlc is closed, so u wont have to do it manually
Just replace 15m with desired time. no suffix or 's' for seconds; 'h' for hours You need to be root or in audio group to write to /dev/dsp. You may use yes | head -n 2000 for about 1 second beep. Wrote this as echo -e '\a' not always works as desired (ex. visual bell)
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.
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
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: