Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to create dirname dynamically using variable when ftping 1

Status
Not open for further replies.

wannabegood

Programmer
Mar 29, 2002
5
US
How do you dynamically create a dirname using variable in a shell script or perl script which runs everyday automatically in a batch when ftping from unix to ntserver?

Is it possible?

Thank you very much
 
mkdir $VAR should work

what variable are you trying to use?

for example if you want to create a directory in the user's home/transfer directory for today's date in bash

#!/bin/bash
$basedir=$HOME/transfer
$mydate=`date +%d-%M-%Y`
mkdir $basedir/$mydate

this would make a /home/d3vnull/transfer/29-Jul-2002 directory (today <G>)

Hope that helps :)


--d3vNull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top