| Page | Description | Tags |
|
Some useful bash shell constructs or one liners:
for ((a=0; a <= 5 ; a++)) do mkdir weekly.$a; done
or
for i in 0 1 2 3; do mkdir weekly.$i; done
Cre… |
bash,
scripting |
|
Simple replace
How to edit a bunch of files with one simple command:
perl -pi.bak -e 's/bad/good/' ~/files.*.conf
Replaces occurence of 'bad' with 'good'… |
perl,
scripting |
|
Could be used as a template in /etc/init.d
#!/bin/sh
# Start/stop the foo system
# /etc/init.d/foo
#
test -f "/etc/foo.conf" || exit 1
case "$1" in
start)… |
bash,
scripting |