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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
list the files but exclude the files in subdirectories shyjuezy UNIX for Dummies Questions & Answers 8 10-15-2008 01:42 PM
How to copy specified files from list of files from dir A to dir B pmeesara Shell Programming and Scripting 3 09-29-2008 03:40 PM
How list of files apart from *.class files in certain folder itsjoy2u Shell Programming and Scripting 3 09-04-2008 10:28 AM
scp list of files nmahendran Shell Programming and Scripting 1 09-03-2008 08:09 AM
counting a list of string in a list of txt files Pep Puigvert UNIX for Dummies Questions & Answers 4 08-15-2008 03:55 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 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
How to get a list of files?

Hi,

That should be an easy one:

How to get all of the files names out of the given directory which are in given format?

vendor_source_object_date_filenum.txt

vendor: constant
source: input parameter
object: predefined list ( customer, mail_addredss, email-address, telephone...)

date: YYYYMMDDHHMMSS
filenum: sequence number of fiel (1,2,3...)

Thanks
  #2 (permalink)  
Old 10-24-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Question Can you show some samples?

Problems where the request is to select based on a criteria are best when example input and output is shown. Can you list filenames in the folder, and include the good and bad ones (for selecting)?
  #3 (permalink)  
Old 10-24-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
... and it depends largely on the shell you are using.
  #4 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
Not sure, what you mean.

Bad one:
bad_file.txt

Good one:
LM_CM_TELEPHONE_20081024114245_1.txt
  #5 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
It is korn shell for sure and ksh93 probably, but not 100% sure.
and her's another question is there way to check what version of shell is using?
  #6 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
Quote:
Originally Posted by joeyg View Post
Problems where the request is to select based on a criteria are best when example input and output is shown. Can you list filenames in the folder, and include the good and bad ones (for selecting)?
Predefined :
dir=$DATA_PATH
vendor='LM' ( constant )
date: any valid date ( for now)

So input is : source

Output is : the list of files to use in FOR loop to process. (LM_CM_TELEPHONE_20081024114245_1.txt)

Last edited by Leo_NN; 10-24-2008 at 11:57 AM..
  #7 (permalink)  
Old 10-24-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
Quote:
Originally Posted by Leo_NN View Post
It is korn shell for sure and ksh93 probably, but not 100% sure.
and her's another question is there way to check what version of shell is using?
Yes. If the command below does not return an error, you have ksh93:

Code:
print ${.sh.version}
Sponsored Links
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 12:51 AM.


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