Find and Replace text (FART): Replaced 0 occurence(s)

The great FART utility seems to be the norm when trying to replace text on the windows command line.

However I can't get it to work as shown in the examples. My test file test.txt:

Images Here Images
ImagesWhateverImages

I now try this:

fart -r -i -p "test.txt" "Images"

and get:

Images Here Images
ImagesWhateverImages
Found 4 occurence(s) in 1 file(s).

Great! But when now trying to replace Images with Foo it won't work:

fart -r -i -p "test.txt" "Images" "foo"
--> Replaced 0 occurence(s) in 1 file(s).

Everyone seems to just do a fart -r -i- p <filename> <string_to_replace> <replacement> command and work with it. What am I doing wrong?

5

1 Answer

Is this a trick question? FART's usage help clearly states that -p stands for "preview", so if you remove it the changes will actually be made.

(Also, -r isn't required if you're only dealing with a single file.)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like