4

sed fails to apply substitute commands

view full story
linux-howto

http://www.unix.com – I've made a shell script for archiving HTML pages, i.e. making them work offline plus add some features. Here is it: Code: #!/bin/sh if [ $1 = "" ] || [ $(echo "$1" | egrep "https?://boards.4chan.org/[a-z0-9]+/res/[0-9]+") = "" ]; then echo "Usage: `basename $0` <4chan thread url> <[OPTIONAL: waiting between sessions in seconds]>" exit 0 fi echo "4chan downloader" LOC=$(echo "$1" | sed 's_.\+/res/\([^#]\+\).*_\1_g') if [ "$LOC" = "" ]; then echo "Can't determine the thread's numb (HowTos)