Sponsored Content
Full Discussion: usage of ftp in C program
Top Forums Programming usage of ftp in C program Post 8162 by bdyjm on Sunday 7th of October 2001 04:56:19 AM
Old 10-07-2001
usage of ftp in C program

thank you of your help

my application system is :

windows 2000 pc --- HP unix minicom ---- windows NT

I am programming with C language on HP unix minicom , I want to get files with ftp command from windows 2000 pc to HP unix minicom in my program, and also put files with ftp command from HP unix minicom to windows NT in my program.
not into command prompt .

hope for your help
 

10 More Discussions You Might Find Interesting

1. AIX

Prevent ftp usage

Is there a way to prevent users to use ftp on my server? And only allow root to use ftp. Thanx (1 Reply)
Discussion started by: NineInch
1 Replies

2. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

3. UNIX for Advanced & Expert Users

Checking mem usage at specific times in a program

Hi all, I'm running a simulator and I'm noticing an slow increase in memory for long simulations such that the simulation has to end because of a lack of memory. A colleague of mine ran Valgrind memcheck and reported that nothing of interest was reported other than known mem leaks. My advisor... (2 Replies)
Discussion started by: pl4u
2 Replies

4. Shell Programming and Scripting

Various usage of FTP in Unix

My project is to write a script to get/put data to another server, be able to log input and output files, have some sort of security for the password, and any errors connecting send a email to a group of people. I've seen examples of perl, java being called by Unix scripts, etc. I've even seen... (1 Reply)
Discussion started by: gavineq
1 Replies

5. UNIX for Dummies Questions & Answers

FTP command-line utility usage

Hi, Using command-line utility "ftp or sftp", I want to transfer files across Windows and UNIX. Can you please tell me from where I need to connect to ftp and how do I specify the hostname, credentials and how do I get and put files between DOS and UNIX? Please provide me as much... (10 Replies)
Discussion started by: Dev_Dev
10 Replies

6. Shell Programming and Scripting

usage of if command in ftp

Hi , I am writing script to copy some files and folders . I am trying to use if command to check if folder exists and then copy in that folder but if command is not working: if then lcd $home_directory/sequences cd sequences mput * else echo "Not a Directory" fi ... (5 Replies)
Discussion started by: ankush_mehra
5 Replies

7. Programming

Examples, usage, help in C++ program

I have written a C++ program to perform raytracing and would want to write some functions to help the user: examples, usage, help I am wondering how this is done. Would I just put some functions in the main program? (4 Replies)
Discussion started by: kristinu
4 Replies

8. Shell Programming and Scripting

[Solved] Usage of shell commands inside a C program

Hi I have a program int main(int srgc, char *argv) { for(int i=1; i<50; i++) { system("dd if=/dev/zero of=file$i bs=1024 count=$i"); } return 0; } My doubt is how to use the "$i" value inside C code Please help (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

9. Shell Programming and Scripting

Script to record max memory usage of program

Hello, I am working on an application that uses allot of memory depending on the input. I am also working on more than one processing algorithm. The program has a long processing time (hours) so it would be nice to be able to monitor the maximum memory footprint of the application during runs... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

10. Ubuntu

Wine cause more cpu usage and freeze program for a couple of seconds

Hi, i am facing a strange issue with wine. I am using ubuntu 14, 17 and 18 and in all version same thing, app which works perfeclty suddenly slow down, and i see that use too much CPU. First, i was thinking that memory is the problem, but now i am thinking that cpu is main problem. I have a... (10 Replies)
Discussion started by: tomislav91
10 Replies
RUNSCRIPT(1)						      General Commands Manual						      RUNSCRIPT(1)

NAME
runscript - script interpreter for minicom SYNOPSIS
runscript scriptname [logfile [homedir]] DESCRIPTION
runscript is a simple script interpreter that can be called from within the minicom communications program to automate tasks like logging in to a Unix system or your favorite BBS. INVOCATION
The program expects a script name and optionally a filename and the user's home directory as arguments, and it expects that it's input and output are connected to the "remote end", the system you are connecting to. All messages from runscript meant for the local screen are directed to the stderr output. All this is automatically taken care of if you run it from minicom. The logfile and home directory parame- ters are only used to tell the log command the name of the logfile and where to write it. If the homedir is omitted, runscript uses the directory found in the $HOME environment variable. If also the logfile name is omitted, the log commands are ignored. KEYWORDS
Runscript recognizes the following commands: expect send goto gosub return ! exit print set inc dec if timeout verbose sleep break call log OVERVIEW OF KEYWORDS
send <string> <string> is sent to the modem. It is followed by a ' '. <string> can be: - regular text, e.g. 'send hello' - text enclosed in quotes, e.g. 'send "hello world"' Within <string> the following sequences are recognized: - newline - carriage return a - bell  - backspace c - don't send the default ' '. f - formfeed ^ - the ^ character o - send character o (o is an octal number) Control characters can be used in the string with the ^ prefix (^A to ^Z, ^[, ^ ^], ^^ and ^_). If you need to send the ^ character, you must prefix it with the escape character. Also $(environment_variable) can be used, for example $(TERM). Minicom passes three special environment variables: $(LOGIN), which is the username, $(PASS), which is the password, as defined in the proper entry of the dialing directory, and $(TERMLIN) which is the number of actual terminal lines on your screen (that is, the statusline excluded). print <string> Prints <string> to the local screen. Default followed by ' '. See the description of 'send' above. label: Declares a label (with the name 'label') to use with goto or gosub. goto <label> Jump to another place in the program. gosub <label> Jumps to another place in the program. When the statement 'return' is encountered, control returns to the statement after the gosub. Gosub's can be nested. return Return from a gosub. ! <command> Runs a shell for you in which 'command' is executed. On return, the variable '$?' is set to the exit status of this command, so you can subsequently test it using 'if'. exit [value] Exit from "runscript" with an optional exit status. (default 1) set <variable> <value> Sets the value of <variable> (which is a single letter a-z) to the value <value>. If <variable> does not exist, it will be created. <value> can be a integer value or another variable. inc <variable> Increments the value of <variable> by one. dec <variable> Decrements the value of <variable> by one. if <value> <operator> <value> <statement> Conditional execution of <statement>. <operator> can be <, >, != or =. Eg, 'if a > 3 goto exitlabel'. timeout <value> Sets the global timeout. By default, 'runscript' will exit after 120 seconds. This can be changed with this command. Warning: this command acts differently within an 'expect' statement, but more about that later. verbose <on|off> By default, this is 'on'. That means that anything that is being read from the modem by 'runscript', gets echoed to the screen. This is so that you can see what 'runscript' is doing. sleep <value> Suspend execution for <value> seconds. expect expect { pattern [statement] pattern [statement] [timeout <value> [statement] ] .... } The most important command of all. Expect keeps reading from the input until it reads a pattern that matches one of the specified ones. If expect encounters an optional statement after that pattern, it will execute it. Otherwise the default is to just break out of the expect. 'pattern' is a string, just as in 'send' (see above). Normally, expect will timeout in 60 seconds and just exit, but this can be changed with the timeout command. break Break out of an 'expect' statement. This is normally only useful as argument to 'timeout' within an expect, because the default action of timeout is to exit immediately. call <scriptname> Transfers control to another scriptfile. When that scriptfile finishes without errors, the original script will continue. log <text> Write text to the logfile. NOTES
If you want to make your script to exit minicom (for example when you use minicom to dial up your ISP, and then start a PPP or SLIP session from a script), try the command "! killall -9 minicom" as the last script command. The -9 option should prevent minicom from hanging up the line and resetting the modem before exiting. Well, I don't think this is enough information to make you an experienced 'programmer' in 'runscript', but together with the examples it shouldn't be too hard to write some useful script files. Things will be easier if you have experience with BASIC. The minicom source code comes together with two example scripts, scriptdemo and unixlogin. Especially the last one is a good base to build on for your own scripts. SEE ALSO
minicom(1) BUGS
Runscript should be built in to minicom. AUTHOR
Miquel van Smoorenburg, <miquels@drinkel.ow.org> Jukka Lahtinen, <walker@netsonic.fi> User's Manual $Date: 2007-10-07 18:13:51 $ RUNSCRIPT(1)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy