The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Vi editor basic commands nervous UNIX for Dummies Questions & Answers 4 10-19-2006 05:55 PM
Basic SFTP questions JohnRodey UNIX for Dummies Questions & Answers 1 09-28-2005 06:01 AM
Basic Unix Commands for cygwin sanjay.karthik Windows & DOS: Issues & Discussions 0 07-25-2005 06:38 AM
basic commands documentation kdgorton UNIX for Dummies Questions & Answers 1 02-20-2005 01:19 AM
Unix basic commands Peter Spellman UNIX for Dummies Questions & Answers 3 08-10-2001 04:41 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-14-2005
Registered User
 

Join Date: Jun 2005
Posts: 5
Need help in sftp basic commands

I'm trying to make use of some common generic functions already present in the scripts loaded in the environment.
A variable VAR1 is declared and used in the generic functions.
Its value is also set in the generic function.

Now I need to use that generic function for PURGING of some old files matching a pattern which are older than x days.
The suggested syntax is
find.. -name LDS-* -mtime +${VAR1} \
-exec ls -l {} \; >> ${LOG_PURGEFILE} 2>&1

But
1. find command does not work in sftp environment.
2. I need to declare VAR1=x, but I cant set the variables in a sftp session.
CUZ Setting variables in an sftp session in not possible. They can only be set outside the sftp and referenced in it
So pls advise how do I go about it..

Pls help ASAP..
Reply With Quote
Forum Sponsor
  #2  
Old 06-15-2005
Registered User
 

Join Date: Jun 2005
Posts: 4
if you could append a date stamp to the end of the files you can easily find and remove the files you need. I dont think your generic function will work in a ftp session.
Reply With Quote
  #3  
Old 06-15-2005
Registered User
 

Join Date: Jun 2005
Posts: 5
Hi..
Thanks..
Can u pls elaborate how can I find and delete the files matching a particular pattern in sftp when I've suffixed the files with date.
I'm pretty new to unix and its actually a bad way to learn the way I'm doing..
Just copy pasting ..cuz of deadline..
So pls help ..

Thanks in adv
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0