03-06-2005
.netrc -- macro not found error
Hi!
Can you please advise if it is possible to have a .netrc file containing a login account for two different ftp servers and two diff macdef commands, and run the a specific macdef depending on the server?
I have copied part of the netrc file.
machine ftp1
login acct1
password psswrd1
machine ftp2
login acct2
password psswrd2
macdef macrodef1
run series of commands under macdef1
macdef macrodef2
run series of commands under macdef2
I Then I try to run it in my script using the following commands 'echo "\$ macrodef1" | ftp -v ftp1' and 'echo "\$ macrodef2" | ftp -v fpt2' but and I get a macro not found error. Please help. Thank you in advance for your help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, id like to ask a question about .netrc. Id like to have 2 entries for a particular machine, but with different ftp userid's ie
machine 172.19.8.26 login dcm password dcm
macdef job1
bin
hash
bye
machine 172.19.8.26 login ppp password ppp
macdef job2
bin
hash
bye
this code DOES... (8 Replies)
Discussion started by: hcclnoodles
8 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to ask if the .netrc file should really be stored/placed in the /home/<userid> directory or in the home directory indicated by the uinfo command?
I am currently having problems with a .netrc file which is owned by a id which has it's home directory pointed to a... (2 Replies)
Discussion started by: edu_escandor
2 Replies
3. UNIX for Dummies Questions & Answers
hello,
I am trying to write an automated script to transfer multiple files to another solaris 5.8 box. I am using the #! /bin/bash prompt and I am having trouble finding/creating the .netrc login file. I googled and the only info I got was that I should create/find it in my home directory. I went... (2 Replies)
Discussion started by: grandtheftander
2 Replies
4. Solaris
Hi,
I am trying to compile our linux code base in solaris and came across the following issues. Am I suppose to do something special ?
Can anyone help me to fix this issue.
System :
uname -a
SunOS aspen 5.10 Generic_125100-08 sun4u sparc SUNW,Sun-Fire-280R
The complier that I am using is... (0 Replies)
Discussion started by: learningkid
0 Replies
5. UNIX for Advanced & Expert Users
Hi friends,
Can we use the file .netrc for automating ftp from a perl script ?
and if so then how do i go about it ?
can i have a sample script for this ?
thanks in advance
Veera (6 Replies)
Discussion started by: sveera
6 Replies
6. AIX
Hello all,
I am using a .netrc to automatically access an ftp host. Here is the line I use...
machine 412.blank.com login nw\mylogin password *******
when I use this command...
ftp 412.blank.com
I get...
Connected to 412.blank.com.
220 server_7 FTP server (EMC-SNAS: 5.5.25.2)... (4 Replies)
Discussion started by: magikalpnoi
4 Replies
7. Programming
I think there is no problem to use any macro in a new macro definishion, but I have a problem with that.
I can not understand why?
I have a *.mak file that inludes file with many definitions and rules.
##############################################
include dstndflt.mak
...
One of the... (2 Replies)
Discussion started by: alex_5161
2 Replies
8. Programming
im working on a program that has to correctly add the macro TWEEN to the system (it determines
if a string falls beween two other strings in a basic sort)
im having problems doing this. here is what i got.
int main(){
char name;
scanf("%s",&name);
if (TWEEN("ABC", name, "XYZ")) printf("%s... (4 Replies)
Discussion started by: rickym2626
4 Replies
9. Shell Programming and Scripting
Am trying a shell script for ftp process on Solaris
I am trying to mget files to
Destination server: myserverxxx1
folder : /backup/dumps/SERVER-1backup/afterbatch
From
Source server: SERVER-1
folder : /dumps/daily/backupafterbatch/Thu21Oct_04:22:37
depending on the date the... (1 Reply)
Discussion started by: sunnyboy
1 Replies
10. UNIX for Dummies Questions & Answers
The software I'm trying to install uses macros with autoconf, aclocal, libtool, autoheader, and automake. What seems to be going on is an error between libtool and aclocal. From what I understand when I run aclocal, which is in /usr/bin, it searches a different directory for the libtool.m4 which is... (0 Replies)
Discussion started by: bphqk3
0 Replies