Home » Infrastructure » Unix » pattern search in unix (SunOS )
pattern search in unix [message #652192] Fri, 03 June 2016 18:55 Go to previous message
namitanamburi
Messages: 35
Registered: March 2009
Member
Please look at the code below.


 if [ $WRITE_TO_FILE = Y ]; then
      Copyfiles $DB_SERVER:$OUT_DIR/?????_?????_${PGM_NAME}_${TIMESTAMP}_summary.txt $OUT_DIR -p
   fi


So above code will bring files like below........

MBR09_CTRT6_pkg-get-mbr-contract_20160602102003_summary.txt

however I need files

MB_CTRT6_pkg-get-mbr-contract_20160602102003_summary.txt
MBR_CTRT6_pkg-get-mbr-contract_20160602102003_summary.txt
MBR8_CTRT6_pkg-get-mbr-contract_20160602102003_summary.txt

The first string before _ can be 2 or more than 2 characters(sucha s MB, MBR, MBR8), above code will bring back only MBR08 as ????? which means it is looking for 5 characters.

Please help.





 
Read Message
Read Message
Read Message
Previous Topic: audit_sys_operations
Next Topic: Software for oracle 11.2.0.4 enterprise edition 32 bit on solaris sparc
Goto Forum:
  


Current Time: Thu Apr 25 05:52:12 CDT 2024