Check These Out
Adding this alias to ~/.bashrc or, better yet, the system-wide /etc/bash.bashrc (as in my setup) will make it possible to not only run pacman as any user without needing to prepend sudo but will also ensure that it always assumes that the user knows what he or she is doing. Not the best thing for large multi-user enterprise setups at all to say the least, but for home (desktop) use, this is a fantastic time-saver.
Also works in places where reset does not.
The (in)famous "FizzBuzz" programming challenge, answered in a single line of Bash code. The "|column" part at the end merely formats the output a bit, so if "column" is not installed on your machine you can simply omit that part. Without "|column", the solution only uses 75 characters.
The version below is expanded to multiple lines, with comments added.
for i in {1..100} # Use i to loop from "1" to "100", inclusive.
do ((i % 3)) && # If i is not divisible by 3...
x= || # ...blank out x (yes, "x= " does that). Otherwise,...
x=Fizz # ...set x to the string "Fizz".
((i % 5)) || # If i is not divisible by 5, skip (there's no "&&")...
x+=Buzz # ...Otherwise, append (not set) the string "Buzz" to x.
echo ${x:-$i} # Print x unless it is blanked out. Otherwise, print i.
done | column # Wrap output into columns (not part of the test).
Almost same output with fewer typing... OP had a great idea : BOFH !!!
I think this is less resource consuming than the previous examples
This command will set bash as the default shell for all users in a FreeBSD system.
I had the problem that the Md5 Sum of a file changed after copying it to my external disk.
This unhandy command helped me to fix the problem.
This uses the ability of find (at least the one from GNU findutils that is shiped with most linux distros) to display change time as part of its output. No xargs needed.
0-1279 = desktop 1 region = face 1
1280-2559 = face 2 ==>> wmctrl 1280 = wmctrl (1281,...2559) are all the same
for a 1280 monitor resolution
math: argument of wmctrl -o = ( DesiredFace * HorizontalResolution - 1)