- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: problem in selecting files as per timestamp wh...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2008 10:57 PM
тАО09-21-2008 10:57 PM
Re: problem in selecting files as per timestamp while ftp
I can understand wget is easy way to do this task,but problem is i cant ask client to use 3rd party software ,so i had to resolve this by unix /scripting ,i am trying but getting directory listing first then do some shell script coding to read alternate line match the string and create file of required ftp files,but here again files generated by ftp dir command contain timestamp in DD-MMM-yyyy HHMISS format where
is yesterday date of by unix command is in dd-mm-yyyy format ,so is there any direct command to change format of date or i handle this also by coding
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 01:10 AM
тАО09-22-2008 01:10 AM
Re: problem in selecting files as per timestamp while ftp
You can't get yesterday's day unless you save it, use perl or a C application.
>is there any direct command to change format of date
date(1) allows you to use any format you like:
date "+%d-%b-%Y"
>I handle this also by coding
Getting "yesterday" may be the toughest.
- Tags:
- date arithmetic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 03:37 AM
тАО09-22-2008 03:37 AM
Re: problem in selecting files as per timestamp while ftp
We could have been of more help from the beginning had you posted some *actual* samples of your file's data.
As Dennis deduced, this is also a continutation of your earlier "Urgent- Problem in FTP" dated August 27 [where you failed to score the feedback given there]. It would have been clearer to this whole discussion had you continued this there.
Either use 'paste' to join multiple lines of your directory listing as I suggested above, or write a simple shell read loop to join (or not) successive lines based on their content.
All this said, use Perl to compute and format "yesterday's" date.
# DATE=$(perl -MPOSIX -le 'print strftime "%d-%b-%Y",localtime(time-86400)')
# echo $DATE
21-Sep-2008
Regards!
...JRF...
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 06:25 AM
тАО09-22-2008 06:25 AM
Re: problem in selecting files as per timestamp while ftp
> save it, use perl or a C application.
A programming problem which can be solved
only by using these two languages?
Interesting, but unlikely.
There's already C code in (my) wget to parse
a VMS FTP server listing (which, I claim, is
much easier to do than parsing a UNIX-like
"ls -l" listing), so you can use it, adapt
it, or ignore it and do it all yourself (in
whichever language you find appropriate).
Having already done this work once, I'm not
particularly interested in doing it again,
but you can do what you wish.
> [...] but problem is [...]
Actually, the _big_ problem here is that you
seem to be unable to present a usefully
complete description of the problem you're
trying to solve, and the constraints on the
solution, which pretty much sucks all the fun
out of trying to help you with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-22-2008 11:14 PM
тАО09-22-2008 11:14 PM
Re: problem in selecting files as per timestamp while ftp
Once i free from work i will make necessary assignment for help
I am doing to code it in shell scripting
actually i was avoiding to write more code
and find some way to do it effectively in one command
but this can be handle with shell scripting
by reading and manipulating file containing dir listing
Best Regards
- « Previous
-
- 1
- 2
- Next »