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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty file

Status
Not open for further replies.

Pablonhd

IS-IT--Management
Nov 1, 2010
36
CA
If run the following command from the cli my temp file contains the data I am looking for.

/usr/bin/sftp -b - 10.0.0.18 &> /tmp/test1.tmp

If i add the same line to a script the temp file is empty.

Any ideas why?

Thanks.
 
is the batch file (-b option) actually called '-' and where is it located?

Because if the command line works as expected it would imply that it is at ~/- (the user 'home' directory) whereas the script may be expecting to find it at /usr/bin/sftp/-



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top