Sponsored Content
Top Forums Shell Programming and Scripting Uploading using sftp file1 copied to file2 Post 302904696 by RudiC on Thursday 5th of June 2014 06:06:35 PM
Old 06-05-2014
The man page for my sftp- implementation does not mention the mput command, but it seems to me that it takes only the first argument for the local files' spec, and the optional second for the target file/directory name. So I guess in your remote copy kk1 was copied over and renamed to kk2. Try: mput kk[12]
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

match value from file1 in file2

Hi, i've two files (file1, file2) i want to take value (in column1) and search in file2 if the they match print the value from file2. this is what i have so far. awk 'FILENAME=="file1"{ arr=$1 } FILENAME=="file2" {print $0} ' file1 file2 (2 Replies)
Discussion started by: myguess21
2 Replies

2. Shell Programming and Scripting

grep -f file1 file2

Wat does this command do? fileA is a subset of fileB..now, i need to find the lines in fileB that are not in fileA...i.e fileA - fileB. diff fileA fileB gives the ouput but the format looks no good.... I just need the contents alone not the line num etc. (7 Replies)
Discussion started by: vijay_0209
7 Replies

3. Shell Programming and Scripting

file1 newer then file2

Hello, I am new to shell scripting and i need to create a script with the following directions and I can not figure it out. Create a shell script called newest.bash that takes two filenames as input arguments ($1 and $2) and prints out the name of the newest file (i.e. the file with the... (1 Reply)
Discussion started by: mandylynn78
1 Replies

4. Shell Programming and Scripting

grep -f file1 file2

Hi I started to learn bash a week ago. I need filter the strings from the last column of a "file2" that match with a column from an other "file1" file1: chr10100036394-100038350AK077761 chr10100041065-100046547AK032226 chr10100041065-100046547AK016270 chr10100041065-100046547AK078231 ...... (6 Replies)
Discussion started by: geparada88
6 Replies

5. UNIX for Dummies Questions & Answers

if matching strings in file1 and file2, add column from file1 to file2

I have very limited coding skills but I'm wondering if someone could help me with this. There are many threads about matching strings in two files, but I have no idea how to add a column from one file to another based on a matching string. I'm looking to match column1 in file1 to the number... (3 Replies)
Discussion started by: pathunkathunk
3 Replies

6. Shell Programming and Scripting

look for line from FILE1 at FILE2

Hi guys! I'm trying to write something to find each line of file1 into file2, if line is found return YES, if not found return NO. The result can be written to a new file. Can you please help me out? FILE1 INPUT: WATER CAR SNAKE (in reality this file has about 600 lines each with a... (2 Replies)
Discussion started by: demmel
2 Replies

7. Shell Programming and Scripting

If file1 and file2 exist then

HI, I would like a little help on writing a if statement. What i have so far is: #!/bin/bash FILE1=path/to/file1 FILE2=path/to/file2 echo ${FILE1} ${FILE2} if ] then echo file1 and file2 not found else echo FILE ok fi (6 Replies)
Discussion started by: techy1
6 Replies

8. UNIX for Dummies Questions & Answers

Compare file1 and file2, print matching lines in same order as file1

I want to print only the lines in file2 that match file1, in the same order as they appear in file 1 file1 file2 desired output: I'm getting the lines to match awk 'FNR==NR {a++}; FNR!=NR && a' file1 file2 but they are in sorted order, which is not what I want: Can anyone... (4 Replies)
Discussion started by: pathunkathunk
4 Replies

9. Shell Programming and Scripting

awk to search field2 in file2 using range of fields file1 and using match to another field in file1

I am trying to use awk to find all the $2 values in file2 which is ~30MB and tab-delimited, that are between $2 and $3 in file1 which is ~2GB and tab-delimited. I have just found out that I need to use $1 and $2 and $3 from file1 and $1 and $2of file2 must match $1 of file1 and be in the range... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

Lookup value of file1 in file2 using a key

Trying to use awk to match each line in file1 with line in file2 using $1 and $2 and print. File2 is tab-delimeted as is the output and if there is no match then it is skipped. The awk below executes but the output is empty. I think file1 is being split on the : and being saved in array c which... (3 Replies)
Discussion started by: cmccabe
3 Replies
LSFTP(1)							    Lsh Manuals 							  LSFTP(1)

NAME
lsftp - Client for the sftp subsystem SYNOPSIS
lsftp [OPTION]... [-- [COMMAND]...] DESCRIPTION
lsftp is a program that connects to a remote sftp server, and can be used to upload download files a la FTP. When invoked with no command arguments, lsftp enters interactive mode, much like ftp (1) (although with a more feature rich interface, providing tab completion, recur- sive up and downloads and more). However, when the -- argument and subsequent commands are passed to lsftp, lsftp simply executes those commands and exits. OPTIONS
Anything (except the special options --, --help and --version ) before the last (if any) -- is handled as options, meaning lsftp passes them directly to the transport program. If you want to pass -- to the transport program, you must give an extra -- to make sure it's not handled as end of options, e.g. lsftp OPTIONS -- MORE OPTIONS -- to enter interactive mode or lsftp -l OTPIONS -- MORE OPTIONS -- ls to perform the ls command. Available options: --help Show summary of options. --version Show version of program. -- End of options (if the last occurence). COMMANDS
cd directory Change the current directory on the remote server to directory. rm filespec Removes files or directories. To delete directories, the -r option needs to be specified. The rm command doesn't accept wildcards by default, to enable these you must specify the -g option. delete Alias for rm. mkdir dir Make directory dir. about Display information about lsftp. help Displays a list of commands. ? Alias for help. longhelp Displays the list of commands with detailed information about each command. ls filespec List remote files and folders. list Alias for ls. dir (Another) Alias for ls. pwd Print the current working directory. quit Quit lsftp. exit Quit lsftp. set [var=value] Sets or shows variables. Without an argument, set displays the current variable state. With a var=value argument, set sets the appropriate variable in the environment. mail Runs the mail (1) command. umask [value] Sets or displays the remote umask. jobs Prints information about currently running jobs. open site Open a sftp connection to site. close Close the current connection. mv old-filename new-filename Rename file old-filename to new-filename. rename Alias for mv. ln file link Make link a symlink to file. get remote-file Retrieve remote-file on the remote system to the local system. put local-file Send local-file on the local system to the remote system. chown uid file Change the ownership of file to be owned by the user represented by uid. chgrp gid file Change the group ownership of file to be owned by the group represented by gid. lcd dir Change the current local directory to dir. lrm file Remove file from the local system. ldelete Alias for lrm. lls List files on the local system. llist Alias for lls. lpwd Print the current local working directory. ! command Executes command in a shell on the local system. ENVIRONMENT
LSFTP_RSH The program to use for the SSH tunnel. If the variable is not set, lsftp defaults to using lshg. LSFTP_BEFORE_ARGS LSFTP_AFTER_ARGS may be used to specify default options to be parsed before and after the command line options, making it possible to provide default transport options as well as commands if desired. REPORTING BUGS
Report bugs to <bug-lsh@gnu.org>. COPYING
The lsh suite of programs is distributed under the GNU General Public License; see the COPYING and AUTHORS files in the source distribution for details. AUTHOR
The lsh program suite is written mainly by Niels Moller <nisse@lysator.liu.se>. The lsftp client was written mainly by Pontus Freyhult. This man-page was written for lsh 2.0 by Pontus Freyhult <pont_lsh@soua.net>, it is based on a template written by J.H.M. Dassen (Ray) <jdassen@wi.LeidenUniv.nl>. Most of the text was taken from the man page provided for the Debian GNU/Linux system by Timshel Knoll <timshel@debian.org>. SEE ALSO
lsftp(1), lshd(8), sftp(1), sftp-server(8) The full documentation for lsh is maintained as a Texinfo manual. If the info and lsh programs are properly installed at your site, the command info lsh should give you access to the complete manual. LSFTP
NOVEMBER 2004 LSFTP(1)
All times are GMT -4. The time now is 10:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy