Search Results

Search: Posts Made By: pavan_test
1,340
Posted By pavan_test
Shell script for FTP folder pattern
Hello,

I have 3 folders on FTP server in the format yyyymmddhhmiss as below,ftp> cd /home/walgreens
250 CWD command successful

ftp> ls
200 PORT command successful
150 Opening ASCII mode data...
1,619
Posted By pavan_test
Sort directories in 'D' on FTP server
Hello,

There are 3 directories on FTP server with format yyyymmddhhmiss.

Can someone please let tell me how do I sort these directories in descending order.

I only have get the files from...
2,303
Posted By pavan_test
Append Files
Hi All,

I have to append 2 lines at the end of a text file. If those 2 lines are already there then do not append else append the 2 lines to the text file.

Eg: I have a text file, file.txt
...
27,156
Posted By pavan_test
File Listing from remote to loca directory using SFTP
yes, I am asking if dir <remote dir> <directory_list_file>
works for sftp. it works with ftp. (i tried and it did not work for me using sftp)

I am not aware if there are any alternate commands...
27,156
Posted By pavan_test
File Listing from remote to loca directory using SFTP
I am able to connect to sftp without using any password.

sftp <port> <user>@<hostname>
sftp> cd <remote dir>
sftp> lcd <local dir path>
sftp> dir <remote dir> lcd
sftp>


Now I login to...
27,156
Posted By pavan_test
File Listing from remote to loca directory using SFTP
Hello,

Using ftp i was able to get a directory listing to local directory.

ftp - i <host_name>
ftp <user>
ftp <password>
dir <dir>
200 PORT command successful
150 Opening ASCII mode data...
4,693
Posted By pavan_test
4,693
Posted By pavan_test
File listing from remote to local directory
Hello,

I have a file at remote server. I have to select only current day's files that are dropped on ftp server. The files do not have date or timestamp on them.

so I plan to get the file...
1,100
Posted By pavan_test
1,100
Posted By pavan_test
Date from file name
Hello,

I have a source file with the following naming convention,

WALGREENS_20120414003410.zip
WALGREENS_20120415003410.zipBased on the file name I have to determine if it is a current day...
5,323
Posted By pavan_test
current day remot files from FTP
I am using sftp since I can't perform ls -l using ftp.
5,323
Posted By pavan_test
current day remote files from ftp
I ran the following SFTP commands manually (on AIX server )

sftp -p $sftp_user@ftp_host
cd $ftp_dir
ls -l test_file.txt
-rwxr-xr-x 1 <user> <usr> 4746 Apr 11 12:13 test_file.txt
bye

Can...
5,323
Posted By pavan_test
current day remote files from sftp
I logged in manually using sftp and I am able to view the file with ls -l

sftp>ls -l
-rwxr-xr-x 1 <userid> <user id> 4743 Apr 11 11:01 test_file.txt
bye
Can you someone please...
5,323
Posted By pavan_test
current day remote files from FTP
I ran the following FTP commands manually (on AIX server )

ftp -inv $ftp_host
$user
$password
cd $ftp_dir
ls test_file.txt
ls_test_file.txt
get test_file.txt
bye

when i do ls <filename>...
5,323
Posted By pavan_test
current day remote files from FTP
This is a new process I am trying to put in place. since we pick up files from external remote server, I don't have rename privileges (or the user ID that I am using.) They give us read only...
5,323
Posted By pavan_test
current day remote files from FTP
ftp -inv $ftp_host
$user
$password
cd $ftp_dir
ls test_file.txt
ls_test_file.txt
get test_file.txt
byehowever I don't know from above when the file was dropped on the server. I have to pick up...
5,323
Posted By pavan_test
current day remote files from FTP
Hi All,

I have to work on a korn shell script to pick up only the current day files dropped on the remote server (using ftp).
The file do not have daytimestamp on it. It has to be based on...
1,035
Posted By pavan_test
find from the list
I don't have to compare element by element in the lists.

Just find

if an element in list1 is somewhere in list 2 then
echo "run the script2"
else
echo "run the script1"

Thanks
Pavan
1,035
Posted By pavan_test
find from the list
Hi All,

I have list such as

list1:

Honda, toyota, GMC


list2:

kia, chrysler, toyota



when list1 match with list2 then
echo "run this script"
else
echo "run the script2"
4,006
Posted By pavan_test
fetch dates for last 36 days in format yyyy-mm-dd
This is the code i have so far. for now the loop is for 5 days. later i wish to update it to 36 days.

#!/bin/ksh

set -x
i=1
while [ $i -le 5 ]; do
_day=`date +%Y%m%d`
newday=`expr $_day -...
4,006
Posted By pavan_test
fetch dates for last 36 days in format yyyy-mm-dd
can anyone please suggest me some ideas for writing a korn shell script which will go back to 36 days from current day and print each day (incremented by 1) in the format yyyy-mm-dd until the current...
5,109
Posted By pavan_test
display all dates 200 days back
Thanks for your response. when I executed the script i got this;

28-02-2010
27-02-2010
26-02-2010
25-02-2010
24-02-2010
23-02-2010
22-02-2010
21-02-2010
20-02-2010
19-02-2010
18-02-2010...
2,190
Posted By pavan_test
display all dates 200 days back
i need help! can someone help me please?
i try to calculate date under unix (ksh)...AIX operating system.

I have to find the date 200 days from today's date.
then the script should loop 200...
5,109
Posted By pavan_test
display all dates 200 days back
i need help! can someone help me please?
i try to calculate date under unix (ksh)...AIX operating system.

I have to find the date 200 days from today's date.
then the script should loop 200...
7,279
Posted By pavan_test
3 days old date
Thanks All.

I found out how do do it.

v_prev_date=`TZ=CST+72 date +%Y%m%d`
echo $v_prev_date
20090801

Thanks
Mark
Showing results 1 to 25 of 72

 
All times are GMT -4. The time now is 07:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy