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
SQL trigger- only insert select details
in ruby how to I subtract time "12/21/08 17:00:02" from "12/21/08 17:00:25"
using apache rewriterule in directory
Folder redirection error for XP workstations on a Server 2003 domain
Conventions about sending email
Where are proclarity views stored on the local machine if they have not been saved out as .bpk?
Using Excel 2000, CSV file contents appear in cell A1
Group Policy fails to reset local policy settings to "not configured" after they have been set to "enabled" by another GPO.
Exchange 2007 Mail-enabled public folder problem !!!
Visa Card Verification