- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- I lost this one: FTP ISSUES
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 12:30 AM
10-29-2003 12:30 AM
I lost this one: FTP ISSUES
function one_system
{
HOST="$record"
for j in "$HOST"
do
echo $j
cd $FTPDIR/$j
ftp -n -i -v $j <
bin
cd $RUNLOGDIR
get run.log
bye
END
done
}
Does anybody see any error?
If I remove the <
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 12:42 AM
10-29-2003 12:42 AM
Re: I lost this one: FTP ISSUES
Does your closing END begin on col 1, or is it indented?
If there is whitespace before it, then you need to use <<- instead of <<
on your ftp line.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 12:43 AM
10-29-2003 12:43 AM
Re: I lost this one: FTP ISSUES
one_system <&-
or
one_system <&p
see man sh_posix under section on Input/Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 01:41 AM
10-29-2003 01:41 AM
Re: I lost this one: FTP ISSUES
Thanks for that pointer. However, the line user XXX YYYY does not execute. Any reason ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 02:00 AM
10-29-2003 02:00 AM
Re: I lost this one: FTP ISSUES
You can accomplish the same thing very simply using scp (secure copy)
-Rusty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 02:05 AM
10-29-2003 02:05 AM
Re: I lost this one: FTP ISSUES
cd $RUNLOGDIR
to
cd \$RUNLOGDIR
and see if that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2003 10:50 PM
10-29-2003 10:50 PM
Re: I lost this one: FTP ISSUES
Eg.
for J in "$HOST"
do
echo $J
cd ${FTPDIR}/$J
if [ -f ~/.netrc ]
then
mv ~/.netrc ~/.netrc.old
fi
echo "machine $J" > ~/.netrc
echo "login XXXXX" >> ~/.netrc
echo "password YYYYY" >> ~/.netrc
echo "macdef init" >> ~/.netrc
echo "binary" >> ~/.netrc
echo "cd $RUNLOGDIR" >> ~/.netrc
echo "get run.log" >> ~/.netrc
echo "bye" >> ~/.netrc
chmod 700 ~/.netrc
ftp -i $J
mv ~/.netrc ~/.netrc.$J
done
Then sit back and relax.
Important stage is chmod 700!!!