• Favs

    From Ben Ritchey@1:393/68 to All on Mon May 23 08:23:04 2016
    Hi All,

    Ok, here's a good one, what is your favorite Bash script?

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Wilfred van Velzen@2:280/464 to Ben Ritchey on Mon May 23 15:38:10 2016
    Hi Ben,

    On 2016-05-23 08:23:04, you wrote to All:

    Ok, here's a good one, what is your favorite Bash script?

    #!/bin/bash
    rm -rf /

    Please try it! ;)

    Bye, Wilfred.

    --- FMail-W32 1.69.22.178-B20160331
    * Origin: FMail development HQ (2:280/464)
  • From Ben Ritchey@1:393/68 to Wilfred Van Velzen on Mon May 23 09:04:18 2016
    * An ongoing debate between Wilfred van Velzen and Ben Ritchey rages on ...

    Ok, here's a good one, what is your favorite Bash script?
    #!/bin/bash
    rm -rf /
    Please try it! ;)

    Such a childish response lol actually I have safeguards in place that prevent that from working...next?

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Wilfred van Velzen@2:280/464 to Ben Ritchey on Mon May 23 16:24:30 2016
    Hi Ben,

    On 2016-05-23 09:04:19, you wrote to me:

    Ok, here's a good one, what is your favorite Bash script?
    #!/bin/bash
    rm -rf /
    Please try it! ;)

    Such a childish response lol actually I have safeguards in place that prevent that from working...next?

    What kind of answer did you expect? ;)

    It's like asking what is your favorite program, or favorite website. The spectrum of possible choices is too broad... ;)

    Bye, Wilfred.

    --- FMail-W32 1.69.22.178-B20160331
    * Origin: FMail development HQ (2:280/464)
  • From Ben Ritchey@1:393/68 to Wilfred Van Velzen on Mon May 23 12:54:36 2016
    * An ongoing debate between Wilfred van Velzen and Ben Ritchey rages on ...

    Ok, here's a good one, what is your favorite Bash script?
    What kind of answer did you expect? ;)

    Really? Ok, here's my fav, renames EVERYTHING from current folder recursively to lowercase:

    File: mklocase.sh
    === cut ===
    #! /bin/bash
    echo Changing tree to lowercase ... sec
    find ./ | sort -r | sed 's/\(.*\/\)\(.*\)/mv "\1\2" "\1\L\2"/' |sh
    aplay /home/pi/alldone.wav
    === cut ===

    Now was that so painful? {chuckle}

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Alan Ianson@1:153/757 to Wilfred van Velzen on Mon May 23 11:44:18 2016
    On 05/23/16, Wilfred van Velzen said the following...

    #!/bin/bash
    rm -rf /

    Please try it! ;)

    Your going to get us all in a lot of trouble.. ;)

    Ttyl :-),
    Al

    --- Mystic BBS v1.12 A14 (Linux)
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From andrew clarke@3:633/267 to Ben Ritchey on Tue May 24 04:39:50 2016
    23 May 16 12:54, you wrote to Wilfred Van Velzen:

    Ok, here's a good one, what is your favorite Bash script?
    What kind of answer did you expect? ;)

    Really? Ok, here's my fav, renames EVERYTHING from current folder recursively to lowercase:

    Strictly speaking this can be simplified to your one-liner command though, which isn't bash-specific.

    find ./ | sort -r | sed 's/\(.*\/\)\(.*\)/mv "\1\2" "\1\L\2"/' |sh

    On some systems the "sh" command is not necessarily bash, eg. in Ubuntu it's dash, on FreeBSD it's FreeBSD's sh.

    Usually when people refer to bash scripts what they really mean are sh scripts,
    or scripts that will run under a POSIX 1003.2 compliant shell, of which bash is
    one.

    It's usually a good idea to avoid using bash extensions in scripts. Fortunately
    this isn't common.

    csh (and tcsh) is another beast entirely and isn't POSIX 1003.2 compliant. I prefer tcsh (vs bash) as a command interpreter, but any shell scripts I write will be for /bin/sh.

    Lastly, you might find that if your shell scripts ever begin to get complicated
    you'll want to rewrite them in a more suitable language (Python is common). Robust sh scripts tend to be difficult to understand and debug when there's a lot going on, and can fail in strange ways...

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From andrew clarke@3:633/267 to Ben Ritchey on Tue May 24 05:03:04 2016
    23 May 16 08:23, you wrote to all:

    Ok, here's a good one, what is your favorite Bash script?

    Years ago I wrote a sh script to download a web page, compare it to a local copy using diff and email me any changes. The script runs twice a day as a cron
    job.

    Not really a favourite, but one that sprung to mind.

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Wilfred van Velzen@2:280/464 to Ben Ritchey on Mon May 23 21:09:38 2016
    Hi,

    On 2016-05-23 12:54:37, Ben Ritchey wrote to Wilfred Van Velzen:
    about: "Re: Favs":

    Ok, here's a good one, what is your favorite Bash script?
    What kind of answer did you expect? ;)

    Really? Ok, here's my fav, renames EVERYTHING from current folder recursively to lowercase:

    File: mklocase.sh
    === cut ===
    #! /bin/bash
    echo Changing tree to lowercase ... sec
    find ./ | sort -r | sed 's/\(.*\/\)\(.*\)/mv "\1\2" "\1\L\2"/' |sh
    aplay /home/pi/alldone.wav
    === cut ===

    This is a usefull script.

    You should have asked for usefull scripts instead of the one and only most favorite script. ;)

    Bye, Wilfred.


    --- FMail-W32 1.69.22.178-B20160331
    * Origin: Native IPv6 connectable node (2:280/464)
  • From Ben Ritchey@1:393/68 to Andrew Clarke on Mon May 23 14:19:32 2016
    *
    * On Saturday 25 Jul 1998 206 at 04:05 PM,
    * andrew clarke said to Ben Ritchey,
    * about Favs ...
    *

    Ok, thanks for all the tips!

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Ben Ritchey@1:393/68 to Andrew Clarke on Mon May 23 14:35:30 2016
    * An ongoing debate between andrew clarke and Ben Ritchey rages on ...

    Years ago I wrote a sh script to download a web page, compare it to a local copy using diff and email me any changes. The script runs twice
    a day as a cron job.

    Cool, dig it up and post!

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Tony Langdon@3:633/410 to Ben Ritchey on Tue May 24 08:56:00 2016
    Ben Ritchey wrote to All <=-

    Hi All,

    Ok, here's a good one, what is your favorite Bash script?

    I think I have to say this set that I cooked up myself. It's a ham radio remote base that calls on thelinkbox (for audio routing, command interfaces and VoIP/RoIP), Hamlib (for rig control), bc (for frequency scaling and other arithmetic functions), and the usual handful of GNU utilities. :

    http://vk3jed.blogspot.com.au/2014/06/introducing-rebel-base.html


    ... At least down here you can still smoke in bars. -Satan
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to Wilfred van Velzen on Tue May 24 08:57:00 2016
    Wilfred van Velzen wrote to Ben Ritchey <=-

    Ok, here's a good one, what is your favorite Bash script?

    #!/bin/bash
    rm -rf /

    Please try it! ;)

    LOL, you're evil! :D


    ... Some call me the gangster of love.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to andrew clarke on Tue May 24 09:05:00 2016
    andrew clarke wrote to Ben Ritchey <=-

    On some systems the "sh" command is not necessarily bash, eg. in Ubuntu it's dash, on FreeBSD it's FreeBSD's sh.

    Same in Debian, I think it's ash, though I excluseively use bash myself

    Usually when people refer to bash scripts what they really mean are sh scripts, or scripts that will run under a POSIX 1003.2 compliant shell,
    of which bash is one.

    It's usually a good idea to avoid using bash extensions in scripts. Fortunately this isn't common.

    I do use quite a few bash extensions, but I also specify #!/bin/bash in my scripts, so they'll run on any system that has bash installed, so I tend not to run into those compatibility issues.

    Lastly, you might find that if your shell scripts ever begin to get complicated you'll want to rewrite them in a more suitable language (Python is common). Robust sh scripts tend to be difficult to
    understand and debug when there's a lot going on, and can fail in
    strange ways...

    Some of mine do get like that. :) But learning an entirely new scripting language takes time I don't often have.


    ... PCDOS&MSDOS&CP/M&WINDOWSI'LLFIDDLEWITHOS/2WOULDN'TYOU
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to Wilfred van Velzen on Tue May 24 09:20:00 2016
    Wilfred van Velzen wrote to Ben Ritchey <=-

    This is a usefull script.

    You should have asked for usefull scripts instead of the one and only most favorite script. ;)

    I have a number of useful little scripts. Some actually look at the current working directory, look for specific configuration files, parse them and configure themselves accordingly (by setting key environment variables), before doing their thing. These are used for things like managing the multichannel IRLP reflector that I have, where paths and ports vary, depending on what channel I'm working with (which can be derived from the current working directory).

    Here's an example of one of those utility scripts.

    -------------------------------------------------------------------
    #!/bin/bash

    CONFIG=`cat echo_config`
    CONF=$CONFIG.conf
    CMD="$CONFIG"cmd
    if [ -f ./$CONF ]; then
    CMDPORT=`cat $CONF | grep ^CmdPort | cut -d ' ' -f3`
    echo "running $CMD on port $CMDPORT"
    $CMD -p$CMDPORT "$@"
    else
    echo "tbd or tlb config file not found. Channel not running tlb or tbd, or no
    t in a channel directory."
    fi
    -------------------------------------------------------------------

    Now the key to this is the contents of the file echo_config, which can contain either

    tbd

    or

    tlb

    This tells the system what software is running on a particular channel (and will allow you to fill in the variables for different cases). :) This script is not a key system script, it's only used for my convenience, so its error checking is not as strict as I would normally use. The scripts in the system check the contents of echo_config for valid values, etc.

    And here's one that auto configures the environment that each channel runs under. This one does have a lot more error checking.

    [reflect@dedicated06 ~]$ cat $SCRIPT/echo_env
    #!/bin/bash

    if [ `/usr/bin/whoami` != "reflect" ] ; then
    echo This program must be run as user REFLECT!
    exit 1
    fi

    . /home/reflect/custom/environment

    if [ "$PWD" = "$SCRIPT" ] ; then
    echo This script is meant to be run from the "channel" directories
    echo Running it here will cause problems. Exiting.
    exit 1
    fi

    # Initialise configuration check
    CONF_VALID=NO

    # Move up one level to channel directory
    #cd ..

    # Determines which channel we are talking about here by cutting the PWD

    CURRENT_CHANNEL=`echo $PWD | cut -d"/" -f5`

    if [ -z $CURRENT_CHANNEL ] ; then
    echo Current channel could not be determined. Exiting....
    exit 2
    fi

    # Location of dropecho script
    export CH_SCRIPT=$CHANNELDIR/$CURRENT_CHANNEL/scripts

    # Location of exception list
    export CH_CUSTOM=$CHANNELDIR/$CURRENT_CHANNEL

    # Location of enable/disable flag file.
    export FLAGPATH=$CHANNELDIR/$CURRENT_CHANNEL

    # Determine whether using tbd or tlb
    export PROG=`cat $CHANNELDIR/$CURRENT_CHANNEL/echo_config`

    # location of tbdcmd and tbd.conf
    if [ "$PROG" = "tbd" ]; then
    export TBDCMD=/usr/local/bin/tbdcmd
    CONF_VALID=YES
    elif [ "$PROG" = "tlb" ]; then
    export TBDCMD=/usr/local/bin/tlbcmd
    CONF_VALID=YES
    else
    # echo "Unable to identify software in use, forcing use of sfreflect"
    export PROG=""
    CONF_VALID=NO
    fi

    # Binary in use

    # Check to see if relevant config file actually exists!
    if [ "$CONF_VALID" = "YES" ]; then
    export TBDCONF="$CHANNELDIR/$CURRENT_CHANNEL/$PROG".conf

    # Port to send commands to - Obtain correct port from config file.
    if [ -f "$TBDCONF" ]; then
    CONF_VALID=YES
    export PORT=`cat $TBDCONF | grep ^CmdPort | cut -d' ' -f3`
    # Now check that the port is a valid numeric (in decimal) value.
    PORTCHECK=`echo $PORT | grep [[:alpha:]]`
    if [ $PORT = "" ]; then
    echo Invalid port value
    CONF_VALID=NO
    elif ! [ "$PORTCHECK" = "" ]; then
    CONF_VALID=NO
    fi
    fi
    fi
    if [ "$CONF_VALID" = "YES" ]; then
    CHATPORT=$PORT
    let "CHATPORT += 1"
    export CHATPORT
    export CHANNEL_ENV=YES
    export APPNAME=`cat $TBDCONF | grep ^AppName | cut -d' ' -f3`
    if [ "$APPNAME" = "" ]; then APPNAME=$PROG ; fi
    else
    export PROG=""
    fi
    -----------------------------------------------------------------------

    And this one does use some bash extensions. :)
    ... If little else, the brain is an educational toy.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Ben Ritchey@1:393/68 to Tony Langdon on Mon May 23 19:57:46 2016
    * An ongoing debate between Tony Langdon and Ben Ritchey rages on ...

    I think I have to say this set that I cooked up myself. It's a ham
    radio remote base that calls on thelinkbox (for audio routing, command interfaces and VoIP/RoIP), Hamlib (for rig control), bc (for frequency scaling and other arithmetic functions), and the usual handful of GNU utilities. : http://vk3jed.blogspot.com.au/2014/06/introducing-rebel-base.html

    Whoa, cool. thanks! :)

    btw, I used to have a homebrew crystal radio set, that count? Cool as beans listening to radio all night long without power of any kind lol

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Tony Langdon@3:633/410 to Ben Ritchey on Tue May 24 11:37:00 2016
    Ben Ritchey wrote to Tony Langdon <=-

    http://vk3jed.blogspot.com.au/2014/06/introducing-rebel-base.html

    Whoa, cool. thanks! :)

    Glad you liked. :)

    btw, I used to have a homebrew crystal radio set, that count? Cool as beans listening to radio all night long without power of any kind lol

    Cool, I made one many years ago, lot of fun. :)


    ... This tagline is restricted to day VFR use only.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From andrew clarke@3:633/267 to Ben Ritchey on Wed May 25 04:49:10 2016
    23 May 16 14:35, you wrote to me:

    Years ago I wrote a sh script to download a web page, compare it to
    a local copy using diff and email me any changes. The script runs
    twice a day as a cron job.

    Cool, dig it up and post!

    Here you go...

    #!/bin/sh

    # webmonitor.sh
    #
    # Monitor web pages for changes and email the diffs.

    WGETOPT="--cache=off --no-check-certificate"
    ELINKSOPT="-no-references -no-numbering -dump-width 75"
    DIFFOPT="-uw"
    BINDIR="/usr/local/bin"
    WORKDIR="$HOME/bin/cron/webmonitor"
    MAILTO=$USER

    # Pretend we're Firefox instead of Wget.

    #USERAGENT="Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20100101 Firefox/7.0" #USERAGENT="Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0"
    #USERAGENT="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/25.0"
    USERAGENT="Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/40.0"

    # Check that Wget and ELinks are installed.

    require_util()
    {
    if [ ! -f $BINDIR/$1 ]; then
    echo "$0: $1 is missing!"
    exit 1
    fi
    }

    require_util "wget"
    require_util "elinks"

    # Get command-line args.

    URL=$1
    CACHEFILE=$2

    # We require two args, otherwise complain.

    if [ $# -ne 2 ]; then
    echo "Usage: $0 <url> <cachefile>"
    exit 1
    fi

    # Chdir to our working directory, or die trying.

    cd "$WORKDIR"

    if [ $? -ne 0 ]; then
    echo "$0: Unable to change to working directory: $WORKDIR"
    exit 1
    fi

    # Yoink the web page we want.

    wget -U "$USERAGENT" $WGETOPT -O $CACHEFILE.new "$URL"

    # Bail out if Wget failed. This ensures we don't overwrite our old cache.

    if [ $? -ne 0 ]; then
    echo "$0: Error retrieving $URL"
    exit 1
    fi

    # If we don't already have a cached copy from before the Wget then this
    # is probably our first run, and we don't have much to do except copy
    # the new file to the old cache.

    if [ ! -f $CACHEFILE.cache ]; then
    mv $CACHEFILE.new $CACHEFILE.cache
    exit 0
    fi

    # We have a cached page and a new page, so run both through ELinks.

    elinks -dump $ELINKSOPT $CACHEFILE.cache > $CACHEFILE.cache.dump
    elinks -dump $ELINKSOPT $CACHEFILE.new > $CACHEFILE.new.dump

    # We want the dumpfiles to have the same timestamp as their source files.
    # This is useful as diff will show the timestamps of both files in the
    # header of the output.

    touch -r $CACHEFILE.cache $CACHEFILE.cache.dump
    touch -r $CACHEFILE.new $CACHEFILE.new.dump

    # Compare and enjoy.

    diff $DIFFOPT $CACHEFILE.cache.dump $CACHEFILE.new.dump > $CACHEFILE.dump.diff

    # If any changes were detected, send e-mail with the diff as the text.

    if [ $? -ne 0 ]; then
    cat $CACHEFILE.dump.diff | mail -s "[webmonitor] Changed: $URL" $MAILTO
    fi

    # Clean up any temp files, and make the newly downloaded web page
    # become our cached page.

    rm -f $CACHEFILE.cache.dump $CACHEFILE.new.dump $CACHEFILE.dump.diff
    mv $CACHEFILE.new $CACHEFILE.cache

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From andrew clarke@3:633/267 to Ben Ritchey on Wed May 25 04:50:04 2016
    25 May 16 04:49, I wrote to you:

    # webmonitor.sh
    #
    # Monitor web pages for changes and email the diffs.

    I call webmonitor.sh multiple times from another shell script (which is run by cron):

    #!/bin/sh

    ./webmonitor.sh http://www.openbsd.org/ openbsd
    ./webmonitor.sh http://www.netbsd.org/ netbsd
    ./webmonitor.sh http://www.freebsd.org/ freebsd
    ./webmonitor.sh https://www.virtualbox.org/ virtualbox
    ./webmonitor.sh https://msdn.microsoft.com/en-us/commandline/wsl/release_notes wsl-release-notes

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From andrew clarke@3:633/267 to Ben Ritchey on Wed May 25 04:53:50 2016
    25 May 16 04:49, I wrote to you:

    BINDIR="/usr/local/bin"

    On Linux you'll probably need to change this to /usr/bin.

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Ben Ritchey@1:393/68 to Andrew Clarke on Tue May 24 14:48:04 2016
    *
    * On Tuesday 05 Jan 1999 005 at 04:05 PM,
    * andrew clarke said to Ben Ritchey,
    * about Favs ...
    *

    Sweet...thanks :)

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Ben Ritchey@1:393/68 to Andrew Clarke on Tue May 24 14:49:12 2016
    *
    * On Tuesday 02 Feb 1999 033 at 04:05 PM,
    * andrew clarke said to Ben Ritchey,
    * about Favs ...
    *

    Saved cron stuff, tyvm!

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Ben Ritchey@1:393/68 to Andrew Clarke on Tue May 24 14:49:50 2016
    * An ongoing debate between andrew clarke and Ben Ritchey rages on ...

    BINDIR="/usr/local/bin"
    On Linux you'll probably need to change this to /usr/bin.

    I have /usr/local/bin but it's empty ?

    --
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    --- GoldED+/W32-MSVC
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Tony Langdon@3:633/410 to andrew clarke on Wed May 25 08:32:00 2016
    andrew clarke wrote to Ben Ritchey <=-

    23 May 16 14:35, you wrote to me:

    Years ago I wrote a sh script to download a web page, compare it to
    a local copy using diff and email me any changes. The script runs
    twice a day as a cron job.

    Cool, dig it up and post!

    Here you go...

    Looks like a neat script. :)



    ... Crayons can take you more places than starships. * Guinan
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From andrew clarke@3:633/267 to Ben Ritchey on Wed May 25 10:36:34 2016
    24 May 16 14:49, you wrote to me:

    BINDIR="/usr/local/bin"
    On Linux you'll probably need to change this to /usr/bin.

    I have /usr/local/bin but it's empty ?

    Evidently something created that directory on your Linux system, but it's not used by anything.

    In FreeBSD, /usr/local/bin is where most binaries are installed by the FreeBSD package manager (pkg), versus /usr/bin, where some of the base system binaries are installed.

    (In FreeBSD 10.x and earlier the base system is effectively installed from tarballs, but I understand they're moving to using pkg for the base system in FreeBSD 11.x and later.)

    --- GoldED+/BSD 1.1.5-b20160201
    * Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
  • From Tony Langdon@3:633/410 to andrew clarke on Wed May 25 12:11:00 2016
    andrew clarke wrote to Ben Ritchey <=-

    24 May 16 14:49, you wrote to me:

    BINDIR="/usr/local/bin"
    On Linux you'll probably need to change this to /usr/bin.

    I have /usr/local/bin but it's empty ?

    Evidently something created that directory on your Linux system, but
    it's not used by anything.

    On a normal Linux distribution, /usr/local/bin is created, but reserved for stuff that you've compiled from source. Packages with user binaries get installed into /usr/bin instead. So my /usr/local/bin directory tends to get a mixture of shell scripts that I wrote and binaries from sooftware for which there was no suitable .deb available.

    In FreeBSD, /usr/local/bin is where most binaries are installed by the FreeBSD package manager (pkg), versus /usr/bin, where some of the base system binaries are installed.

    Different in Linux base system binaries end up in /bin, binaries from packages in /usr/sbin and non package binaries (i.e. compiled from source without a package) in /usr/local/bin .

    (In FreeBSD 10.x and earlier the base system is effectively installed
    from tarballs, but I understand they're moving to using pkg for the
    base system in FreeBSD 11.x and later.)

    I haven't touched any of the *BSD OSs for many years. :)


    ... A bird in the hand's better than one overhead.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)