need help getting a script to run on WinNT using binutils

Susan Anzalone susan1@dnai.com
Fri May 18 09:09:00 GMT 2001


I have a script that apprently needs GNU Binutils in order to run.  It
appears to me that it's looking on my c: drive which happened to be
reformatted due to a system failure last week.  I'm running Win NT4, sp5
and
wanted to see if you knew what I would need to do to my system to get this
script up and running.  I have NO experience with Binutils or the language
of this script.  Any help would be greatly appreciated.   The script
basically takes a series of text files and merges them all into one file
called mips.txt or sips.txt.  It takes the data that is originally
organized
line by line and it makes it tab delimited.  I am including the script
below.  Please reply to susan1@dnai.com.

Thanks,
Susan
susan1@dnai.com
------------------------------------


@echo off
rem works only with NT, needs gnu binutils, cat, cut, tr
echo %0 creates mips.txt and sips.txt from
echo      *.mip and *.sip
echo for import into a database
echo .
echo This will be done RECURSIVELY starting in the current folder:
cd
echo Existing mips.txt and sips.txt will be overwritten !
echo press any key to continue Ctrl-c to abort
pause > null:

echo starting ...

rem creating header line
for /R %%i in (*.mip) do (
c:\bin\echo -E -n file_name"	" > mips.txt
cat "%%i" | cut -s -f1 -d"=" | tr \n \t >> mips.txt
echo   . >> mips.txt
)

rem now the data
for /R %%i in (*.mip) do (
c:\bin\echo -E -n now converting %%i ...
c:\bin\echo -E -n %%~nxi"	" >> mips.txt
cat "%%i" | cut -s -f2 -d"=" | cut -f1 -d";" | cut -f1 -d"	" |tr \n
\t
>> mips.txt
echo  . >> mips.txt
echo done.
)


rem creating header line
for /R %%i in (*.sip) do (
c:\bin\echo -E -n file_name"	" > sips.txt
grep -i -B1000 4DFT "%%i" | cut -s -f1 -d"=" | cut -f1 -d"	" |tr \n
\t
>> sips.txt
echo   . >> sips.txt
)

rem now the data
for /R %%i in (*.sip) do (
c:\bin\echo -n -E now converting %%i ...
c:\bin\echo -E -n %%~nxi"	" >> sips.txt
grep -i -B1000 4DFT "%%i" | cut -s -f2 -d"=" | cut -f1 -d";" | cut -f1 -d"
" |tr \n \t >> sips.txt
echo  . >> sips.txt
echo done.
)


echo finished!



More information about the Binutils mailing list