find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
#!/bin/bash
extensions=(flac mp3 wav ogg)
for i in "${extensions[@]}"
do
count=$(find $1 -name "*.$i" | wc -l)
if [ $count != "0" ]; then
echo -e "$i:\t"$count
fi
done
NOTE: Uses 3rd party service.
curl ifconfig.me
Note: You need a GCP API key to use this. Argument 1 is the text to convert, argument 2 is the name of the mp3 file.
curl -H "Content-Type: application/json; charset=utf-8" \
--data "{
'input':{
'text':'$1'
},
'voice':{
'languageCode':'en-gb',
'name':'en-GB-Wavenet-C',
'ssmlGender':'FEMALE'
},
'audioConfig':{
'audioEncoding':'MP3'
}
}" "https://texttospeech.googleapis.com/v1/text:synthesize?key=[your api key here]" | jq -r '.audioContent' | base64 -d > $2.mp3
curl -s https://beacon.nist.gov/beacon/2.0/pulse/time/$(date '+%s') | jq --raw-output '.pulse.localRandomValue'
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
www.website.org/
This command will allow you to mount a remote directory to your local device using only SSH. Note that if the server only accepts publickey authentication you will need to specify the absolute path to the desired identity as shown below.
sshfs -o allow_other,default_permissions,IdentityFile=/home/user/.ssh/id_ed25519,debug,uid=myuid,gid=mygid \
user@serveraddress:/server/remote/directory <local_directory>
This one line command utilizes wget to crawl a website. I have used this to monitor for broken links on my website with much success.
wget --spider -r -nd -nv -H -l 5 -w 1 -o output.log https://example.com/