z1=({0..38}); z2=({39..76}); z3=({77..114}); z4=({115..152}); z5=({153..190})
for((i = 1; i < 5; ++i)); do
declare -n a=z$i
for n in ${a[@]}; do
wget http://domain.com/path/$n.jpeg
done
done
#!/bin/bash
declare -A map1 map2
IFS=$'\n'
while read line; do
map1["$line"]=1
done < /tmp/file1.txt
while read line; do
map2["$line"]=1
done < /tmp/file2.txt
for k in ${!map1[@]}; do
[[ "${map2[$k]}" ]] || echo $k
done
a='a a a
b b b
c c c'
# вариант 1
echo "$a" | while read x; do
echo "---$x---"
done
# вариант 2
while read x; do
echo "---$x---"
done < <(echo "$a")
last_time_online=`curl -s "http://lolygirl.ru/time_online.php?client=clear"`
last_time_online=${last_time_online:1:${#last_time_online}-1}
curr_date=`date +%s`
echo $(($curr_date - $last_time_online))
f=/tmp/test.txt
if ((`date +%s` - `date +%s -r "$f"` > 20)); then
# do something
fi
sed -i '\| include bx/conf/ssl.conf| { s| include bx/conf/ssl.conf|#&|; a\
ssl_certificate /etc/letsencrypt/live/mfwo.ru/fullchain.pem;\
ssl_certificate_key /etc/letsencrypt/live/mfwo.ru/privkey.pem;\
ssl on;\
keepalive_timeout 70;\
keepalive_requests 150;\
ssl_session_cache shared:SSL:10m;\
ssl_session_timeout 10m;
}' /tmp/test.conf
Можно вместо `........` использовать $(..........), тогда будет работать как в первом случае