The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 08:55 PM
Basic SFTP questions JohnRodey UNIX for Dummies Questions & Answers 1 09-28-2005 09:01 AM
Basic Unix Commands for cygwin sanjay.karthik Windows & DOS: Issues & Discussions 0 07-25-2005 09:38 AM
basic commands documentation kdgorton UNIX for Dummies Questions & Answers 1 02-20-2005 04:19 AM
Unix basic commands Peter Spellman UNIX for Dummies Questions & Answers 3 08-10-2001 07:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-14-2005
livetaurean19 livetaurean19 is offline
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..
  #2 (permalink)  
Old 06-15-2005
dnidiffer dnidiffer is offline
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.
  #3 (permalink)  
Old 06-15-2005
livetaurean19 livetaurean19 is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:04 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0