Pattern Matching and extracting the required fields in Perl
Hi All,
I am writing the following Perl Scrip and need your help in Pattern matching :
I have the following Shell Script that would read line by line from the file (file_svn) and would inturn calls the Perl Script:
The file file_svn contains the following:
From the above,
1) Get the path after trunk and then create those directories under the /home/dev/filter/build/tmpl/ and /home/dev/filter/build/ovrd/ if they dont exists.
(excluding -r860 ..etc)
Example:
After Running the Perl Script for first line:
The directories (/feeds/templates/) doesn't exists under /home/dev/filter/build/tmpl/ and /home/dev/filter/build/ovrd/ , then we have to create them.
Then the file should be saved as
/home/dev/filter/build/tmpl/feeds/templates/shell_script.txt
Fyi -> svn export (firstline) <<path>> would actually saves the file under the given path.
The Perl Script is below:
Could someone please help me out in finishing the above perl script.
...
The file file_svn contains the following:
From the above,
1) Get the path after trunk and then create those directories under the /home/dev/filter/build/tmpl/ and /home/dev/filter/build/ovrd/ if they dont exists.
(excluding -r860 ..etc)
Example:
After Running the Perl Script for first line:
The directories (/feeds/templates/) doesn't exists under /home/dev/filter/build/tmpl/ and /home/dev/filter/build/ovrd/ , then we have to create them.
Then the file should be saved as
/home/dev/filter/build/tmpl/feeds/templates/shell_script.txt
...
...
Maybe something like this?
tyler_durden
This User Gave Thanks to durden_tyler For This Post:
Hi I am trying to pattern match with sed, if it finds a match I need it to insert characters at the 28th position, its working but its also adding an extra space and I don't know why, below is the code.
sed 's/715023044/\n&/g' $asn | sed '/^71502304413-000/s/./B4/28' | sed -e :a -e... (4 Replies)
Hi,
I have a string looks like the following:
USERS 32767.9844 UNDOTBS1 32767.9844 SYSAUX 32767.9844 SYSTEM 32767.9844 EMS 8192 EMS 8192 EMS_INDEXES 4096 EMS_INDEXES 4096 8 rows selected.
How do I extract a sub-string to get the expected output as following:
EMS 8192
EMS_INDEXES 4096
... (3 Replies)
Guys, i'm new to shell scripting. Here's what i need.
I need a shell script which would read a file containing only 1 line which never changes.
File containts -
SQL_Mgd_Svc_ELONMCL54496 |EMEA\brookkev, EMEA\fieldgra, EMEA\tidmamar, EMEA\attfiste, EMEA\baldogar, EMEA\clarkia2, EMEA\conwasha,... (9 Replies)
Hi All,
I am pretty new to pattern matching and extraction using shell scripting. Could anyone please help me in extracting the word matching a pattern from a line in bash.
Input Sample (can vary between any of the 3 samples below):
1) Adaptec SCSI RAID 5445
2) Adaptec SCSI 5445S RAID
3)... (8 Replies)
Hi All ,
I need to extract the strings that are matching with the pattern : CUST.<AnyStringOfAnyLength>.<AnyStringOfAnyLength> from a file and then write all these string into another file.
e.g. If a file SOURCE contains following lines :
IF(CUST.ABCD.EFGH==1) THEN
CUST.ABCD.EFGH =... (7 Replies)
Hello experts,
I have a file containing the following text(shortened here).
File Begin
----------
< # Billboard.d3fc1302a677.imagePath=S:\\efcm_T4
< Billboard.d3fc1302a677.imagePath=S:\\efcm_T4
---
> # Billboard.d3fc1302a677.imagePath=S:\\efcm_Cassini
>... (2 Replies)
Hi there,
i'm having some problems just making an awk script (i've tried this way, but other way can be posible for sure), for the next file
file.txt
<register>
<createProfile>
<result>0</result>
<description><!]></description>
<msisdn>34661461174</msisdn>
<inputOmvID>1</inputOmvID>... (6 Replies)
Hello everyone, this is my first post so please give me a hand.
I apologize for my English, I'll try to be clear with my request.
I need to write a script (Bash) which finds all the variables defined in the file .h of the folder and then writes the name of the files .c where these variables are... (1 Reply)
Hi all, how could i do ?
I have a Rss file, i want to extract only the Urls (many) matching http://www.xxx.com/trailers/ from that file and copy into another file.
like
"
<pubDate>Wed, 29 Apr 2009 00:00:00 PST</pubDate>
<content:encoded><!Apple - Movie Trailers - The Hangover"><img... (3 Replies)
hi i am trying to get digits inside brackes from file , whose structure is defined below
CREATE TABLE TELM
(SOC_NO CHAR (3) NOT NULL,
TXN_AMOUNT NUMBER (17,3)
SIGN_ON_TIME CHAR (8)
TELLER_APP_LIMIT NUMBER (17,3)
FIL01 ... (2 Replies)