still thinking about this one

seen from Malaysia
seen from Canada
seen from China

seen from Italy
seen from Slovakia
seen from Yemen

seen from Malaysia
seen from Türkiye

seen from Malaysia
seen from United Kingdom

seen from Russia
seen from Finland

seen from Australia

seen from Czechia
seen from Colombia
seen from Netherlands

seen from Italy

seen from United States
seen from Colombia

seen from Germany
still thinking about this one
Sysadmin Diaries - Day 24
Tip of the day?Seems to be turning into script of the day.Yes another script. This time I wanted a script to rename file, file.txt to file.txt.old orĀ file,txt.new to file.txt. Hereās the script to do this.
#!/bin/bash # Rename files depending on input # Check input is valid i.e. one argument either old or new if [ $# -ne 1 ] then echo "Usage: $0 new | old" exit 1 else if [[ $1 != "new" && $1 != "old" ]] then echo "Usage: $0 new | old" exit 1 fi fi TYPE=$1 # backup file to file.old if [ $TYPE = "old" ] then find . -name "*.txt" | while read TXTFILE do mv $TXTFILE ${TXTFILE}.old done fi # Rename file.new to file if [ $TYPE = "new" ] then find . -name "*.new" | while read NEWFILE do NEWNAME=`echo $NEWFILE | cut -d "." -f1-3` mv $NEWFILE $NEWNAME done fi
The script renames the file depending on whether old or new is specified as an argument. The first part just checks if one argument is supplied and if it does, then whether it is old or new. If one of them is an argument, itāll either copy or rename the file depending on the option.
So, in essence, an example of checking input then doing a simple copy/rename,
Until next week
Bash Script to automate convert-ing of a folderful of JPGs into an animated GIF
I frequently use ImageMagick to convert screencaps (themself extracted using ffmpeg) into GIF animation.
The command for ImageMagick is nothing short of a veeery convoluted and hairy gobbledegook. For example:
convert -verbose -delay 12 *.jpg -resize 540x540 -ordered-dither o8x8,6 \( -clone -4 -set delay 18 \) -swap -5 -delete -1 \( -clone -3 -set delay 24 \) -swap -4 -delete -1 \( -clone -2 -set delay 30 \) -swap -3 -delete -1 \( -clone -1 -set delay 36 \) -swap -2 -delete -1 -layers Optimize vadercape_7_540.gif
Lifeās too short, and such a convoluted command line is easy to make a mistake in.
So I wrote togif.sh to ease the job.
It runs perfectly in Cygwin, and I see no reason why it canāt run on Linux.
Itās an Open Source script, released under Mozilla Public License (MPL) version 2.0 (MPL 2.0).
How to create custom commands in Unix/Linux
How to create custom commands inĀ Unix/Linux
Few days ago one of my friend told me that the work on linux is so difficult, because he didnāt remember the complex commands of linux and every time when he want to do some debugging on their linux server he always need to google some commands first, so Iāve decided to write this postĀ āHow to create custom commands in Unix/Linuxā.
There are many ways to do this, Iāve explained some of theā¦
View On WordPress