how to convert this script in command line?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to convert this script in command line?
# 8  
Old 08-20-2012
Quote:
Originally Posted by methyl
Try creating and testing a script, then executing that script from the C Programming Language system() call.
It will drive you nuts trying to get a one-liner to work in this situation.
the script already exist:
Code:
ftp -v -n ftp.site.com <<END_OF_SESSION
user Foo 3122
ascii
lcd /home/foo/mywebsite
mput *
mput *.*
bye
END_OF_SESSION

The problem is i cant left open the information about server name, login and password to everyone see it. That's why i need to convert this command in one terminal command line.

Quote:
Off topic.
Why?
Code:
mput *
mput *.*

If the source system is a unix system, the MSDOS 8.3 file naming convention is irrelevant. The mput * should be sufficient.
yeah, this script was originally for DOS, dont really need the second line.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Repeat line convert upper line

HI Guys, My Input :- R3 AV44 50 0 100 100 100 R3 AV44 1 0 100 100 100 R3 AV45 50 0 100 100 100 R3 AV45 0 3 100 100 100 R3 AV45S 50 0 100 100 100 R3 AV45S 0 4 100 100 100 Output :- R3 AV44 50 0 100 100 100 1 0 100 100 100 R3 AV45 50 0 100 100 100 0 3 100 100 100 R3 AV45S 50 0... (9 Replies)
Discussion started by: pareshkp
9 Replies

2. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

3. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

4. Shell Programming and Scripting

convert single line output to multiple line

Hi all, I have a single line output like below echo $ips 10.26.208.28 10.26.208.26 10.26.208.27 want to convert above single line output as below format. Pls advice how to do ? 10.26.208.28 10.26.208.26 10.26.208.27 Regards Kannan (6 Replies)
Discussion started by: kamauv234
6 Replies

5. Shell Programming and Scripting

convert fields on each line to one line

Hello, I have a text file with the following fields: RecordNumber Name Email Date Notes Confirmed MailingList The problem is that each field is on a separate line. These seven fields repeat for the length of the file. What I want to do is to have a bash script or similar unitil EOF... (6 Replies)
Discussion started by: vestport
6 Replies

6. Shell Programming and Scripting

Command executes on the command line but not from script

Hello guys, I have the following commands : Command 1: sudo find "../bundlepool" -name "merchandising2.html" -print0 |xargs -0 -I {} cp "rebranding/merchandising2.html" {} Command 2: find "../bundlepool" -name "merchandising2.html" -exec cp rebranding/merchandising2.html {} \; Command 3: ... (2 Replies)
Discussion started by: ihabo01
2 Replies

7. UNIX for Dummies Questions & Answers

command line util to convert mm to inches etc?

There must be a command line utility to convert metric -> us, mm to inches etc, but I don't remember seeing it. Any suggestions? Anything in the repositories? Thx. (4 Replies)
Discussion started by: koodawg
4 Replies

8. Shell Programming and Scripting

perl script command line option driven script

could someone show me a sample command line option driven script? i want to see an easy way to write one and how i can execute it using command line options such as typing in read.pl -i <id> -c <cmds> -s <start> -e <end> would read out all the commands run by ID . from start time to... (7 Replies)
Discussion started by: kpddong
7 Replies

9. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

10. Shell Programming and Scripting

here-doc convert 2 script convert to single script?

I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into. main.sh #!/bin/ksh getLS.sh > output.txt getLS.sh #!/bin/sh /home<..>/sftp <host@ip> <<! cd /some/dir/Log ls -alt quit ! Basically I'd like to be... (2 Replies)
Discussion started by: yongho
2 Replies
Login or Register to Ask a Question