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
Show result only if number is greater then umen Shell Programming and Scripting 1 12-05-2007 04:03 AM
total number of files which have "aaa" in files whose names are File*_bbb* sudheshnaiyer UNIX for Dummies Questions & Answers 1 08-16-2007 02:34 PM
how to find capital letter names in a file without finding words at start of sentence kev269 Shell Programming and Scripting 1 04-10-2006 09:35 PM
[awk]: Row begins by random number and field 10 is greater than 10.00% Lomic Shell Programming and Scripting 3 03-18-2005 09:59 AM
finding the number of open files jyotipg UNIX for Advanced & Expert Users 1 05-20-2002 09:18 AM

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 11-09-2007
harmonwood harmonwood is offline
Registered User
  
 

Join Date: Jun 2007
Location: Texas
Posts: 10
Finding files with names that have a real number greater then difined.

I am trying to find all files in a directory whose name has a real number larger then the number I am looking for.

For example:

.
|-- delta.1.5.sql
|-- delta.2.1.sql
|-- delta.2.2.sql
|-- delta.2.3.sql
|-- delta.2.4.sql
`-- delta.2.5.sql

I know my database is at 2.2 so I want an output like this:

delta.2.3.sql delta.2.4.sql delta.2.5.sql


I am using bash. Could somebody help me with this?
  #2 (permalink)  
Old 11-09-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
Code:
awk '$2FS$3>v' v="2.2" FS="." <(printf "%s\n" delta*.sql)
  #3 (permalink)  
Old 11-09-2007
harmonwood harmonwood is offline
Registered User
  
 

Join Date: Jun 2007
Location: Texas
Posts: 10
Awesome, that's exactly what I needed : )

Thank you
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 11:26 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