Do you have permission to write on the remote directory?
Quote:
Originally Posted by Analabhatla
Could we have an option to cut the columns from the .csv file once uploaded in to unix? I need the last column in the excel sheet to run against the database.
You can save-as your excel file as 'csv' and upload that. In MS-Excel, file->save-as and select CSV in filetype down list.
Later on the unix server, you can extract the last column.
Thanks CLX. I'm able to upload the .csv file in to unix server directory and then run the cut command to extract last column. However i need your help with the following ? sorry for troubling .
1. I'm able to ftp the file from desktop to Unix directory via windows cmd. Will there be any way to perform this FTP operation via UNIX directly? I meant logging in to putty and then ftp to desktop location and then get the file to unix directory. This way it will help me to automate the uploading process for other csv files.
2. The csv file has the 4 fields and sql's that i need to run on database are present in 3rd field. I need help in writing the command / script which reads the sql in 3rd field for all the records and run it against the database and fill the result back in to last field of the file?
1. I'm able to ftp the file from desktop to Unix directory via windows cmd. Will there be any way to perform this FTP operation via UNIX directly? I meant logging in to putty and then ftp to desktop location and then get the file to unix directory. This way it will help me to automate the uploading process for other csv files.
Sorry but cant help you in this, this is something you need to contact your network/admin to check at firewall side whether the relative port is open or not. you need to provide the windows hostname/ipaddress to them.
Quote:
Originally Posted by Analabhatla
2. The csv file has the 4 fields and sql's that i need to run on database are present in 3rd field. I need help in writing the command / script which reads the sql in 3rd field for all the records and run it against the database and fill the result back in to last field of the file?
Does this mean you want to extract third filed from CSV? If yes,
do something like,
automating a ftp job from your local system to a unix system... hmm... unless your .csv's are uniquely timestamped it might not work in your favor. you can always cd into the folder from command line (windows) and then ftp to the remote server. use the options:
or use a ftp tool like filezilla (i usually suggest this to any users who are non-tech savvy as it has a gui interface) and drag and drop.
this is untested as I just wrote it, but more or less should work from a unix system but you will have to adjust it for your needs:
but keep in mind that is only for a specific filename. you would have to use
if you are importing or getting all files from that folder.
be sure to try this out manually first line by line prior to making this a consistent job.
Hi,
I want to use scp to upload file to my unix server.
i am using this:
scp D:\testr.txt unixuser@unixhost:/path
it returns an error:
ssh: D: host/servname not known
i am not sure how to tell path of my D drive in the command and how will command understand it has to pick from my... (5 Replies)
Xperts,
My requirement is something like this,
I have a sql script which i need to embed in a shell. The sql (oracle) script will generate a .csv file in some Unix directory. the approximate file size is around 10 mb which i need to upload to an sftp server. My concern here is how to make... (5 Replies)
Hello,
I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver.
Here's what I have that finds the newest file:
find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Hi ,
I want to upload some files from my desktop to unix server through FTP . The list of files are in a text file .Please suggest how to do it through scrip .
Thanks in advance ..
Anupam (8 Replies)
Hi all
i have a such question this is my shell script my script must upload file to webdav server
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#!/bin/sh
###... (1 Reply)
Hi,
Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server (sdmc222.sdmc.cp-srv.com) which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :-
ftp... (3 Replies)
Hi
I have an excel file with only 5 rows .I want to uplaod those 5 rows to a database using a shell script.Is this possible.If so where do i start.
Thnks (1 Reply)
hi,
i m working on a perl cgi script which uploads a file to the server. i m stuck. i hav written the errors.
plz help.
Sachin Kaw
______________________________________________________________________
#!/usr/bin/perl -w
use CGI;
use CGI qw(:standard);
use strict;
use POSIX... (4 Replies)
I am having problems uploading files to my new server. I am new at this so im sure im doing it wrong. I tried using wsftp but that didnt work. please help me!! (4 Replies)