I'm no PC jockey. I just use it to get other stuff done, so bear with me. I
downloaded the GNUWin sed package so that I could run sed at the DOS command
prompt. When I execute the sed command "sed -e 's/whitesox/White Sox/g' <
baseball_test_file.txt > baseball_test_file_ja.txt", I get the message:
'sed' is not recognized as an internal or ext, operable program or batch file.
The sed.exe file is in a directory path under Program Files. You'd think the
system would find it. I've been looking at information about changing my
"Home" values, and a whole bunch of other stuff, but I'm getting nowhere.
Little help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You could instead add the directory where sed and its dependencies (.dll
files) are located to your system PATH. Your system PATH is a semicolon
separated list of directories that are searched by the system for programs and
their dependencies. To see your PATH at the command prompt type
echo %PATH%
If sed.exe is "C:\Program Files\gnustuff\bin\sed.exe" for example, you could
append C:\Program Files\gnustuff\bin to your system path. However by doing
that anything else in that directory can also be searched by the system. This
is not always desirable and can lead to compatibility conflicts depending on
what else is there. I've uploaded a screenshot for GetGnuWin32 users that
shows how to add to the path.
Ray, after a bit of stumbling around, playing with single quotes and double
quotes, and restarting my PC, I got everything you suggested to work. Your
graphic description for changing the PATH was particularly helpful. I can't
tell you how much I appreciate your help. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm no PC jockey. I just use it to get other stuff done, so bear with me. I
downloaded the GNUWin sed package so that I could run sed at the DOS command
prompt. When I execute the sed command "sed -e 's/whitesox/White Sox/g' <
baseball_test_file.txt > baseball_test_file_ja.txt", I get the message:
'sed' is not recognized as an internal or ext, operable program or batch file.
The sed.exe file is in a directory path under Program Files. You'd think the
system would find it. I've been looking at information about changing my
"Home" values, and a whole bunch of other stuff, but I'm getting nowhere.
Little help?
You could call the program directly, for example if you have sed.exe in
"C:\Program Files\gnustuff\bin"
"C:\Program Files\gnustuff\bin\sed.exe" "s/whitesox/White Sox/g" < in.txt >
out.txt
You could instead add the directory where sed and its dependencies (.dll
files) are located to your system PATH. Your system PATH is a semicolon
separated list of directories that are searched by the system for programs and
their dependencies. To see your PATH at the command prompt type
echo %PATH%
If sed.exe is "C:\Program Files\gnustuff\bin\sed.exe" for example, you could
append C:\Program Files\gnustuff\bin to your system path. However by doing
that anything else in that directory can also be searched by the system. This
is not always desirable and can lead to compatibility conflicts depending on
what else is there. I've uploaded a screenshot for GetGnuWin32 users that
shows how to add to the path.
You can find it here:
Ray, after a bit of stumbling around, playing with single quotes and double
quotes, and restarting my PC, I got everything you suggested to work. Your
graphic description for changing the PATH was particularly helpful. I can't
tell you how much I appreciate your help. Thanks.