Posts by Thiago Rider Augusto • 186 points
4 posts
-
1
votes1
answer208
viewsA: Conversion of timestamp epoch file name to date
I believe this script can do the job: #!/bin/bash exec 3< timestamp.txt while read arq <&3; do epoch=$(echo $arq | awk '{ print $1 }' FS="_") filenameend=$(echo $arq | awk '{ print $2 }'…
-
0
votes2
answers289
viewsA: How to check if ip latency is greater than 0?
You can compare two float numbers in bash using the command bc: avg_rtt=$(ping $1 -c1 |grep rtt |awk {'print$4'} |awk -F "/" {'print$2'}) if (( $(echo "$avg_rtt > 0" |bc -l) )); then echo "OK"…
shell-scriptanswered Thiago Rider Augusto 186 -
2
votes2
answers553
viewsA: Backup email IMAP OR POP what difference?
IMAP is an electronic message access protocol, commonly used in Webmail or with a correctly configured client. It has an interesting feature that messages are stored on the server and the protocol…
-
2
votes2
answers254
viewsA: Unzipping files with space in name
You can insert double quotes in the for and in charge unzip that the bash will work well with filenames in which there is space: for z in "*.zip"; do unzip "$z" ; done…