[PLUG] what simple linux command does this?

Rogan Creswick creswick at gmail.com
Thu Sep 30 00:57:24 UTC 2010


On Wed, Sep 29, 2010 at 5:47 PM, logical american
<website.reader3 at gmail.com> wrote:
> So there really isn't one single command, is there?

I don't believe there is, but I think it's an easy script to write.
Something like this should do:

--Rogan

#!/bin/bash
#
#   this has only been *very* minimally tested:

SRC_DIR=`dirname "$1"`
DEST_ROOT="$2"
DEST="$DEST_ROOT/$SRC_DIR"
SRC_FILE="$1"

mkdir -p "$DEST"
cp "$SRC_FILE" "$DEST"



More information about the PLUG mailing list