![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 02: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 04:40 PM |
| How list of files apart from *.class files in certain folder | itsjoy2u | Shell Programming and Scripting | 3 | 09-04-2008 11:28 AM |
| scp list of files | nmahendran | Shell Programming and Scripting | 1 | 09-03-2008 09:09 AM |
| counting a list of string in a list of txt files | Pep Puigvert | UNIX for Dummies Questions & Answers | 4 | 08-15-2008 04:55 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Quote:
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 |
|
|||||
|
Code:
> ls -w1
./
../
LG_JG_CLIENT_20081024114245_1.txt
LG_JG_CLIENT_200810241142_1.txt
LG_JG_CLIENT_baddata.txt
LG_JG_CUSTOMER_20081024114245.txt
LG_JG_CUSTOMER_20081024114245_1.txt
LM_CM_CUSTOMER_20081024114245_2.txt
LM_CM_TELEPHONE_20081024114245_1.txt
LM_CM_TELEPHONE_20081024114245_2.txt
LM_CM_TELEPHONE_20081024114269_3.txt
LM_JG_CUSTOMER_20081024114245_1.txt
> ls | awk -F"_" 'NF==5 && ($3=="CLIENT" || $3=="CUSTOMER") {print $0}'
LG_JG_CLIENT_20081024114245_1.txt
LG_JG_CLIENT_200810241142_1.txt
LG_JG_CUSTOMER_20081024114245_1.txt
LM_CM_CUSTOMER_20081024114245_2.txt
LM_JG_CUSTOMER_20081024114245_1.txt
> ls | awk -F"_" 'NF==5 && ($3=="CLIENT" || $3=="CUSTOMER") && ($4>20080101000000) {print $0}'
LG_JG_CLIENT_20081024114245_1.txt
LG_JG_CUSTOMER_20081024114245_1.txt
LM_CM_CUSTOMER_20081024114245_2.txt
LM_JG_CUSTOMER_20081024114245_1.txt
Perhaps you can see/understand the logic used here, and expand upon it for your needs. I make sure five fields -- four _ characters I see if field 3 is CLIENT or CUSTOMER I verify that the date > 2080101 (date) 000000 (time) |
|
||||
|
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 01:16 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|