![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help for Sed Syntax problem | SanjayLinux | Shell Programming and Scripting | 2 | 10-15-2007 10:52 PM |
| syntax problem | rajan_ka1 | Shell Programming and Scripting | 3 | 03-16-2006 07:13 AM |
| syntax problem | rajan_ka1 | Shell Programming and Scripting | 3 | 03-08-2006 10:04 AM |
| Command syntax | dsimpg1 | UNIX for Dummies Questions & Answers | 2 | 02-17-2005 11:13 AM |
| Problem with UNIX cut command | kevin80 | Shell Programming and Scripting | 3 | 05-28-2003 06:57 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Syntax problem with Unix ftp get command
An outside vendor has staged 2 batch files for us and I've tried to retrieve the files using the commands that they've indicated I could use to retrieve one file at a time. I've tried using this command in a shell script after a successful connection to their server:
get "$$ ID=IL096869 BID='PGP LBX IMAGER ILFSLBX' ONEBATCH=Y" $FTPFILE The error I receive: 550 $$ command missing or syntax error -> <15928 ID=IL096869 BID='PGP LBX IMAGER ILFSLBX' ONEBATCH=Y> I suspect it's the difference between Windows ftp and Unix and the interpretation of either the double quotes or the $$. Does anyone spot the problem? Thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Looks like pure gibberish.
$$ will give you the current pid in a shell script. You talk about batch/shell scripts and windows/unix, which is which? What have you been given? When automating windows FTP sessions I generate a script.fto which has username and password as separate lines at the start, the various get/put and quit, then invoke it with the -s option. eg, script.ftp contents myuser mypassword binary get foo quit cmd - ftp -s:script.ftp hostname On UNIX I use the "$HOME/.netrc" file to manage the username/password then pass the get/put etc in as stdin to ftp. |
|
#3
|
|||
|
|||
|
Hello Porter,
Not gibberish at all. We use ftp commands in Unix shell scripts for several outside vendors and have just the logon information in the .netrc file. Typically we deal with actual file names but this bank has established a macro of some sort that allows us to either get all the files in one batch or one file at a time using the ONEBATCH parameter. We never see actual filenames on their servers. Here is the command that I used that finally allowed me to successfully retrieve one file at a time: get "\$$ ID=IL096869 BID='PGP LBX IMAGER ILFSLBX' ONEBATCH=Y" $FTPFILE The \ was the missing link that literally told the command interpreter to ignore special treatment of the $. The retrieval is accomplished using user ID and Batch ID arguments instead of actual filenames. Works pretty slick. |
|||
| Google The UNIX and Linux Forums |