1
vote
Accepted
Blocking traffic from specific countries. How to kill existing connection?
Since several years, the Linux kernel has been having an API to forcibly kill existing IP sockets whatever their state. It can be done with the ss command and its filter syntax:
-K, --kill
Attempts ...
1
vote
Bash parameter substitution (baparmsub?) Isnt working
You have to use shopt -s extglob which is usually on for interactive shell, but off in scripts.
#!/bin/bash
shopt -s extglob
step=_SOME_under_SCORES
a=${step//_+([a-zA-Z])/_}
echo "[$step]=>[...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bash × 3528linux × 1317
shell × 432
scripting × 393
ssh × 328
shell-scripting × 255
ubuntu × 245
cron × 186
command-line-interface × 159
unix × 152
centos × 145
debian × 103
sed × 86
sudo × 71
rsync × 70
grep × 70
bashrc × 67
backup × 63
awk × 62
mysql × 59
find × 59
php × 58
redhat × 57
mac-osx × 54
python × 49