john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Wget download move directory timestamp variable

!/bin/bash

Script to download and move

TIMESTAMP=/bin/date +%Y-%m-%d--%H-%M TARGET="/home/ubuntu/VFS5/pfeifferwinbuilds"

if [ -d $TARGET ]; then

echo "$TIMESTAMP start downloading... "
wget --user=USERNAME --password=PASSWORD http://site:8080/path/file.exe -P $TARGET && mkdir "$TARGET/$TIMESTAMP" && mv "$TARGET/file.exe" "$TARGET/$TIMESTAMP/file.exe"
echo "done downloading"

else echo "directory not found" fi


  • « Linux wifi wpa supplicant wpa2
  • Amazon dns route53 »

Published

Mar 25, 2011

Category

linux

~37 words

Tags

  • directory 13
  • download 12
  • move 1
  • scripts 63
  • timestamp 3
  • variable 6
  • wget 7