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
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #8 (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
Cool Does this work for you?

Code:
> ls -l
total 16
drwxrwx---  2 xxx dp  512 Oct 24 08:56 ./
drwxrwx--- 99 xxx dp 3072 Oct 24 08:48 ../
-rw-rw----  1 xxx dp    0 Oct 24 08:53 LG_JG_CLIENT_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:56 LG_JG_CLIENT_200810241142_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:55 LG_JG_CLIENT_baddata.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LG_JG_CUSTOMER_20081024114245.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LG_JG_CUSTOMER_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LM_CM_CUSTOMER_20081024114245_2.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114245_2.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114269_3.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LM_JG_CUSTOMER_20081024114245_1.txt
> ls -l | grep "[A-Z]*_[A-Z]*_[A-Z]*_[0-9]\{14\}*_[0-9]*.txt"
-rw-rw----  1 xxx dp    0 Oct 24 08:53 LG_JG_CLIENT_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LG_JG_CUSTOMER_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LM_CM_CUSTOMER_20081024114245_2.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114245_1.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114245_2.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:48 LM_CM_TELEPHONE_20081024114269_3.txt
-rw-rw----  1 xxx dp    0 Oct 24 08:49 LM_JG_CUSTOMER_20081024114245_1.txt
>
  #9 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
print ${.sh.version}
ksh: ${.sh.version}: 0403-011 The specified substitution is not valid for this command.

so how to get the real version?
  #10 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
Here's what I got:

Quote:
>ls -l | grep "[A-Z]*_[A-Z]*_[A-Z]*_[0-9]\{14\}*_[0-9]*.txt"
>Invalid \{\} repetition.
  #11 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
Yes, something like this, thanks.

1.Should it be just "ls" instead of "ls -l"?
2.How to check if "object" is in the list?
3. what is the right syntax to put some params into grep, like
ls | grep "${VENDOR}_${SOURCE}_[A-Z]*_[0-9]\{14\}*_[0-9]*.txt" ???

Go Celts!

Last edited by Leo_NN; 10-24-2008 at 12:16 PM..
  #12 (permalink)  
Old 10-24-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,794
Quote:
Originally Posted by Leo_NN View Post
print ${.sh.version}
ksh: ${.sh.version}: 0403-011 The specified substitution is not valid for this command.

so how to get the real version?
You may try:

Code:
print $KSH_VERSION
If you get no output, you have ksh88.
If you insist to know the exact release of ksh88

set -o vi (or other) -> Esc (to enter in command mode) -> Ctrl+V:

Code:
$ set -o vi
$ Version M-11/16/88i
  #13 (permalink)  
Old 10-24-2008
Leo_NN Leo_NN is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 34
Nothing:

Quote:
> print $KSH_VERSION
<NO OUTPUT>
> set -o vi
>
So it is ksh88, right?
  #14 (permalink)  
Old 10-24-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,794
It's ksh88. See above to display the exact version press the Escape key, then press the Control and the V key (like paste in Windows).

Last edited by radoulov; 10-24-2008 at 01:26 PM.. Reason: button -> key
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 06:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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