kutu62
March 5th, 2008, 04:55 PM
okay guys I have to pull data out of a file.. tried grep and c shell script and can't figure out how to pull what I need out of the file. we need to pull out from the start of the paragraph to the end of the URL... the file format is below
*****
start of file
*****
first paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/ERTyuisfdmnbxcvk
second paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjfghjfghjghjghhedsrg
third paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/dtyjr6jh45yrthbe6r5
fourth paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjtyj4356jh5tyjn
***** end of file ******
so the end result would be my script will extract each paragraph and URL individually
example output:
fourth paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjtyj4356jh5tyjn
any ideas?? Many thanks
*****
start of file
*****
first paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/ERTyuisfdmnbxcvk
second paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjfghjfghjghjghhedsrg
third paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/dtyjr6jh45yrthbe6r5
fourth paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjtyj4356jh5tyjn
***** end of file ******
so the end result would be my script will extract each paragraph and URL individually
example output:
fourth paragraph is here and has data I need to pull out and then is followed by a URL
http://sub.mycompany.com/fgjtyj4356jh5tyjn
any ideas?? Many thanks