Login or Register to Ask a Question and Join Our Community

UNIX macro....Im new!!

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers UNIX macro....Im new!!
# 1  
Old 05-21-2014
UNIX macro....Im new!!

Hey guys, thanks for lookin....my question is I want to create a macro on HPUX to SFTP a .xls to my Windows Server....I have exstensively searched and all I can find is What a macro is not how to create one.

Reasoning for having a macro is to put it in a file creation script and have it run at the end of it.

Thanks for any and all help....

For security reasons I cannot post any scripts, thanks.
# 2  
Old 05-21-2014
"macro" has no particular meaning to UNIX, though it might to some specific application in UNIX. By "macro" do you maybe mean "script"?
# 3  
Old 05-21-2014
Yes, script, applogies for sounding dumb Im still learning. I would to be able to add an automated sftp function of a certain file in a certain dir from Unix to Windows. Im not a writer but I was tasked by one of my sups. to figure it out. Thanks.
# 4  
Old 05-21-2014
I would to be able to add an automated sftp function of a certain file in a certain dir from Unix to Windows.
You want to automatically upload files from UNIX to Windows with sftp?

Upload what files, when, to where? Every day at a certain time?

Is the Windows machine running an SFTP server?
# 5  
Old 05-21-2014
Actually, most ftp clients support a facility called macros. You get into interactive mode and define a macro with the macdef command. It is a very limited and rarely used facility. I just checked and sftp does not support the macdef command nor do I see any mention of macros on the sftp man page.

Here is a thread: https://www.unix.com/showthread.php?t=83546 that shows some ftp macros.
These 3 Users Gave Thanks to Perderabo For This Post:
# 6  
Old 05-21-2014
Wanting to transfer:
-rw-r--r--   1 comp       comp       2660373 May 21 06:00 resvmstr.xls

that file daily on or about 1300 EST. to Windows using an automated SFTP script. I already have the script that creates that file but I have to do it manually. I have so many things on my plate right now that this option is not the most efficient one. So, in turn, I would like the file script and sftp to run everyday around 1300 without me having to push the go button.

I have PuTTY installed on my Windows machine and I am using SNettERM for Unix.

Thanks Perderabo for your input as well.

Last edited by Scott; 05-21-2014 at 06:38 PM.. Reason: Code tags
# 7  
Old 05-23-2014
PUTTY and SNettERM are clients, not servers. For them to work at all there must be a daemon of some sort for them to connect to.

It's a good bet you have an ssh/sftp/scp daemon running on your HPUX machine, but it's very unlikely you have one running on Windows. That means it'd be much easier to run the script on the Windows side than the UNIX one.

You can get the pscp utility from the same folks who made PUTTY, and use it in a batch file like so:

pscp.exe -l username -pw password hostname:/path/to/file destfile

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Explanation of a macro

Can some body explain this part in a header file for me? #include <limits.h> #define BIGNUM unsigned long long typedef BIGNUM (*hash_t) (char *str); ......I have hard time for the second part: typedef BIGNUM (*hash_t) (char *str); First, I could not find the definition of hash_t, which... (1 Reply)
Discussion started by: yifangt
1 Replies

2. UNIX for Dummies Questions & Answers


Can I create a macro in UNIX? If so where do I find out how? (1 Reply)
Discussion started by: JD_Sal
1 Replies

3. Shell Programming and Scripting

Invoke a script in UNIX using Excel Macro

Hi, I am using Send Keys to connect to UNIX server and invoke a script . Is there an alternate way to connect to UNIX server using Excel macro and invoke a UNIX Shell script? Anu (2 Replies)
Discussion started by: anandita.jha
2 Replies

4. UNIX for Dummies Questions & Answers

F-key macro...

Hi everyone, What I am trying to do is assign a F-key a macro to save a file in vi and display said file in firefox. The details are as follows: I am using a Win 7 laptop with and ssh program to log into a unix system. What I am trying to do is figure out how to bring up the firefox... (1 Reply)
Discussion started by: csharp100
1 Replies

5. Shell Programming and Scripting

Unix macro help

Hi, I just opened one old RH box and found number of "macros" in there, that how they called in how-to doc, let say you type <rx> and this does a lot of stuff. I can't figure out how it work, how I can edit/display these macros? Can anybody point to the right directions? I have some academic... (3 Replies)
Discussion started by: trento17
3 Replies

6. Programming

Make-question - redefine a macro, using another macro..?

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

7. Programming

Regarding #ident macro

Hi, In my application I have some number c files. In each of the file the following line will be the first statement. #ident "@(#) set.c 05/15/01 17:06:32" I would like to know what is the use of the above statement. Thanks Sarwan (1 Reply)
Discussion started by: sarwan
1 Replies

8. Programming


Can i define a macro for a function of 10 LOC. (9 Replies)
Discussion started by: bankpro
9 Replies

9. HP-UX


I'm upleveling code from 10.20 to 11.11....but I'm running into a problem in which the USRSTACK macro does not seem to be defined in 11.11. Has anybody else experienced this/fixed it/worked around it? Is there a different macro I should be using instead? Thanks for any info you can provide!! (1 Reply)
Discussion started by: jalburger
1 Replies

10. UNIX for Dummies Questions & Answers

VI Macro Problem

I'm having a problem with a macro i put in my .exrc file. Here's what I put: map #I ^[ ^ [ is control-v and the escape key. It places a # a the beginning of a line by simply hitting the # on the keyboard. Problem is, now when I hit "o" or "O" to move up or down a line, it places a # at... (1 Reply)
Discussion started by: Atama
1 Replies
Login or Register to Ask a Question

Featured Tech Videos