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
Emails going to blackberry using exchange 2003 POP are being marked as read in outlook
How do I ghost one machine to another via ethernet
Lost my audio
Word 07 - How do I remove the margins completely so that a tilte spreads across an entire A4 page?
How to avoid duplicate record in Mysql
Windows Server Event log tool
Move From IIS6 to IIS7
W3C validation there is no attribute "border" on imagebuttons.
OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.
DumpSec Help