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
Flash - Pause for 10 seconds
Averaging a Sum in Crystal Reports
Firebird Subquery
How do I tell Perl where to find .pm modules
Eject CD in POST, which was used for Kickstart boot
IIF expression in Access 2002 Query
Exchange 2003 Queue wont empty after message delivered
How can I turn horizontal row data in Excel into vertical data like in a database using VBA
powershell : sending e-mails : "newline" problem
RUBY CHANGE DIRECTORY