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 8 Movie Clips
How do I populate text to a bookmark in a Word table that is contigent on a selection from a dropdown box?
On-Line Vs. Off-Line Advertising Benchmark
can i move the $hf_mig$ file to the D: drive?
Problem of transfering data from table to txt file
BCP date format
Computer generates annoying chick chick noise at intervals...
running multiple servers on a home network
Spybot S&D fails to run
How to allow users to upload a file - via an email form - using a Perl script?