Link to home
Start Free TrialLog in
Avatar of cbones
cbonesFlag for United States of America

asked on

script to extract text from a file and place into another file

Looking for a script to find a specific word in a file and copy some text after it?

Example:

$This is a test - For something - Else

The script would find "$" and copy "$This is a test - For something" leaving out the rest.   Looking for the second "-" as a completion.  It would loop through the file and copy that data wherever it saw the criteria to a new file.
Avatar of aikimark
aikimark
Flag of United States of America image

Please post an example file with such changes.  Your description doesn't convey the actual data transformation you want
Avatar of cbones

ASKER

I attached two files.  A Source file and Destination file.  The second "-" could be used as a mark to copy the data out to a new file.

Thank you
C--Sample-SourceFile.txt
C--Sample-DestinationFile.txt
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial