Microsoft
Software
Hardware
Network
Question : Script to extract pattern
Given the following string:
file="JYAX3-0501MT011027AA
E2U2APP.jp
g"
Using a bash script I need to extract 011027 from it to use as a variable later in the script. Using sed or awk how would I go about doing this? There is a long list of these file names but they all have the same pattern.
Thanks,
Scott
Answer : Script to extract pattern
awk '/[0-9][0-9][[0-9][[0-9][A
-Z][A-Z][0
-9][0-9][[
0-9][[0-9]
/{print substr($0,match($0,/[0-9][
0-9][[0-9]
[[0-9][A-Z
][A-Z][0-9
][0-9][[0-
9][[0-9]/)
+6,6)}'
Random Solutions
Slipstream XP with sp2 and IE7 plus updates
Could you help me? ---- Where is the <a rel="nofollow" href="http://www.interland.com?" target="_blank">www.interland.com?</a>
Introducing Exchange 2003 server into a Single Domain with a Exchange 2000 domain Controller.
How do I import Macros and the icon onto a new pc from an old pc
Cells.Find Problems
If I have two email accounts in Outlook, how do I send emails from each one with the correct email address showing?
Need assistance in growing my site traffic
SQL Server's equivalent of Oracles sequence?
Copy all files in one directory
How to reinstall Outlook Express