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
is it possible to install Windows XP onto a laptop which does not have a cd or dvd rom?
Macro to email an attached Excel file on Lotus Notes email client
files ffastun.ffa
Custom Template not listed on the Certification Authority 's Enable Certificate Templates
How to display the Main Menus and Hidden Objects in MS Access 2000
Python and GUI
Remote Assistance: How to connect using non-standard RDP Port
Registry Restore
WinXP SP2 settings not supported by GPO (from GPMC.msc)
Is there a better way to write formula than use a nested if statement?