10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All
Below is the script I am trying to execute to rename a file in an SFTP session.
It is in GNU/Linux.
This script is for generic use and so I am passing arguments. Everything in the script works fine except "reading the filename in SFTP session"
In the below script the... (2 Replies)
Discussion started by: sparks
2 Replies
2. Shell Programming and Scripting
I have a .ksh script that creates an sftp batch file and runs it through sftp. It works except for one thing. If I try to "put" to a different name, it doesn't use the specified remote name...it still "puts" the original local name.
I've tried both of these, and neither work...it will always... (4 Replies)
Discussion started by: dbiggied
4 Replies
3. Shell Programming and Scripting
Hi,
In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this?
I am using #!/bin/ksh
For eg: sftp user@host <<EOF
cd /path
get *.txt
rename *.txt *.txt.done
... (7 Replies)
Discussion started by: jhilmil
7 Replies
4. Shell Programming and Scripting
Hi guys,
I have written a code to move my file from one directory to another directory, the file is in .csv format and i need to append a current date to the file. the prolem is date is getting appended after the file extension..
here is my code :
cd /data/home/abc/xyz
now=$(date... (7 Replies)
Discussion started by: azherkn3
7 Replies
5. Shell Programming and Scripting
Hi
Am trying to move a file from one name to another
When I do "ls" to check for the moved filename
I can see the file but when I try the same with a script am unable..
I think am doing some pretty silly error.. please help..
toMove=`ls | grep -E "partition.+"`
mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies
6. Shell Programming and Scripting
Hi,
Am using sftp (dsa method) to transfer 20 files from one server(sftp) to another (local). After the transfer is complete the files in the sftp server has to be renamed from .txt extension to .done extension ( aa.txt to aa.done, bb.txt to bb.done and likewise...).
I tried rename command... (4 Replies)
Discussion started by: Sindhuap
4 Replies
7. Shell Programming and Scripting
Hi All,
I have a script which works perfectly for using SFTP commands.
I use SFTP -b batchfile remoteuser@remoteserver.
This batch file contains a command
cd /dir1
put file1
I am wondering if there is a flag to rename a file on Remote server.
I see the option
rename file1... (6 Replies)
Discussion started by: Hangman2
6 Replies
8. Shell Programming and Scripting
I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile).
The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies
9. Shell Programming and Scripting
have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies
10. Shell Programming and Scripting
I am a complete Unix newbie and I need some help! (Please...)
I need to rename a file from the following format:
Test_Test_EAR_1234.ear
To the following:
Test_Test_EAR.ear
In other words, I need to remove everything after & including the final underscore up to the "." What is the best... (6 Replies)
Discussion started by: VeloLisa
6 Replies