Directly download all mp3 files of the desired podcast
This command will take the output of a command and color any STDERR output as a different color (red outline in this case) Show Sample Output
The -start_number can be ignored if sequence starts with 0, otherwise use first number in sequence
You will get an json respond if all is fine Show Sample Output
only simple example how to combine rclone & jq Show Sample Output
Get the two first lines of a file and quit. Show Sample Output
Extracts only file number 12 from file. It's meant for text files. Replace 12 with the number you want. First line starts at 1 not 0. We use q on next line so doesn't process any line more.
Use -i option to edit directly a file: sed -i 's|\/|\\|g' file Show Sample Output
Use -i to edit file directly: sed -i 's|\\|\/|g' file Show Sample Output
It his example removes ' dog', last space included. Show Sample Output
Downloads the frame of given YouTube video at 8 minutes 14 seconds. Requested format is "299", which 1080p only video.
A text file contains thousands of numbers. This command prints lines were the number is greater or equal than a specified value (134000000). Show Sample Output
single-column-numbers.txt is a text file with 22658 rows (numbers) in a single column. Each number can range from 0 to 134298679.533591 and the dot is for the decimals. This is done with perl because awk can't sum such high numbers. Show Sample Output
The Linux Cross Referencer is nice: https://elixir.bootlin.com/linux/latest/source but when you want to find an example usage of an idiom across multiple lines, piping the ack-grep output to less is quicker. The --cc limits the search to C code, -i to ignore case, -A4 because most wait_event variants have 4 arguments that may be on lines after the function name. Use --make to search makefiles Show Sample Output
No need to use perl, awk, nor /usr/bin/date -- bash's "printf" builtin will do it. Show Sample Output
Output the current time in Swatch “Internet Time”, aka .beats. There are 1000 .beats in a day, and @0 is at 00:00 Central European Standard Time. This was briefly a thing in the late 1990s. More details:
https://2020.swatch.com/en_ca/internet-time/
The alias is rather quote heavy to protect the subshell, so the bare command is:
echo '@'$(TZ=GMT-1 date +'(%-S + %-M * 60 + %-H * 3600) / 86.4'|bc)
Show Sample Output
“$0” is a variable returning the name of the script that you call it in — so running “./$0&” twice amounts to the script running itself in a separate process twice. Show Sample Output
Get newest kernel version by parsing the most bleeding-edge Makefile possible. Useful for doing things like writing live ebuilds and/or self-updating PKGBUILDs for testing purposes. Breakdown: * wget -qO - https://raw.githubusercontent.com/torvalds/linux/master/Makefile — retrieve Makefile and pipe to stdout * head -n5 — only the first 5 lines are relevant, that's where all the version variables are grep -E '\ \=\ [0-9]{1,}' — version variables always have an equals sign followed by a number * cut -d' ' -f3 — extract the individual numbers from the version variables * tr '\n' '.' — replace newlines with periods * sed -e "s/\.$// — remove trailing period Show Sample Output
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: