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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Creation of output file from list of file ganapati Shell Programming and Scripting 7 01-18-2008 07:55 PM
Use file as list in for loop... earnstaf Shell Programming and Scripting 11 06-18-2007 02:48 PM
List File size komputersman UNIX for Dummies Questions & Answers 10 06-13-2007 05:39 PM
List file without the bumff Zak Shell Programming and Scripting 7 03-16-2005 02:30 AM
Get a none duplicate list file trynew Shell Programming and Scripting 5 06-25-2002 01:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-29-2007
happyv happyv is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 209
list out a specify file

Hello,

I would like to list out all CLIENTINVOICE*.archived (but not _9_4_bfmh.archived or other such as _x_x_xxx.archived). how can I do it?

/appl/appl/archive/client/CACHE/CLIENTINVOICE05020_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05021.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05021_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05022.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05022_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05023.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05023_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05024.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05024_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05025.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05025_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05026.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05026_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05027.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05027_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05028.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05028_9_4_bfmh.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05029.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05029_9_4_bfmh.archived
  #2 (permalink)  
Old 03-29-2007
dennis.jacob dennis.jacob is offline Forum Advisor  
dj - the student
  
 

Join Date: Feb 2007
Location: Singapore/Bangalore/Cochin
Posts: 599
Try :

Code:
ls  | grep -v 'CLIENTINVOICE.*_'
o/p:

/appl/appl/archive/client/CACHE/CLIENTINVOICE05021.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05022.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05023.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05024.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05025.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05026.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05027.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05028.archived
/appl/appl/archive/client/CACHE/CLIENTINVOICE05029.archived
  #3 (permalink)  
Old 03-29-2007
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,955
Code:
ls -l *[0-9].archived
  #4 (permalink)  
Old 03-29-2007
mona's Avatar
mona mona is offline
Registered User
  
 

Join Date: Nov 2005
Location: Singapore
Posts: 96
This?

Code:
ls -lt | egrep '*CLIENTINVOICE[0-9]*.archived'
  #5 (permalink)  
Old 03-31-2007
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by happyv
Hello,

I would like to list out all CLIENTINVOICE*.archived (but not _9_4_bfmh.archived or other such as _x_x_xxx.archived). how can I do it?

/appl/appl/archive/client/CACHE/CLIENTINVOICE05020_9_4_bfmh.archived
...
/appl/appl/archive/client/CACHE/CLIENTINVOICE05029_9_4_bfmh.archived

Code:
printf "%s\n" /appl/appl/archive/client/CACHE/CLIENTINVOICE/appl/appl/archive/client/CACHE/CLIENTINVOICE????.archived
  #6 (permalink)  
Old 03-31-2007
matrixmadhan matrixmadhan is online now Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,955
Quote:
Originally Posted by cfajohnson

Code:
printf "%s\n" /appl/appl/archive/client/CACHE/CLIENTINVOICE/appl/appl/archive/client/CACHE/CLIENTINVOICE????.archived

After CLIENTINVOICE there are 5 digits

above command should end with ?????
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 04:03 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