Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pipe ¦ question and a varibles question to

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hello all i'am having problem with passing varibles to my script here is what i mean :

if i make a batch file that does this:

@echo off
type %1 | perl4 %2 %3 %4 %5 %6 %7 (this batch file is called parse.bat

then have OTHER batch file that does this:

parse.bat stream.log \4 \otest.log ( then run this batch file first)

everything works fine BUT if i tried to put it all in ONE batch file like this

perl4 parse.pl stream.log \4 \otest.log

it don't work even if i try a (pipe command) | still no go what i'am doing wrong?

btw this is on windows98/dos o.s system

any one know how i can fix this?

thanks
 
Pipes are a bit funny on Windows systems....

Also, I notice that you're using Perl4 -- have you considered upgrading to Perl 5? Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
well i figure this much out so far


if i run a this:

tail -f cardout.dat ( ooutputs it to the screen)


this works find BUT if i do this

tail -f cardout.dat | perl4.exe parse.pl /4 /otest.log ( don't work NOTHING in the test.log file )

nothings work :(

but if i do this
type cardout.dat | perl4.exe parse.pl /4 /otest.log ( outputs it to the screen AND the perl script works fine)

works great so i don't know if the perl script NEEDS the screen output fori ti to work or what :(

any ideas?

thanks


 
My friend, can you avoid using Perl 4???

Perl 4 had a lot of quirks, even on its supported platform UNIX. On Windows, it was a young port and had even MORE quirks. Pipes are bad in Windows... but WORSE in Perl 4 than in Perl 5.6. Your software needs a tune-up, see?

I strongly reccomend upgrading to Perl 5.x. You can download ActiveState Perl for Windows, or you can download Cygwin (inc. Perl). Note that Cygwin is slower, but it attempts to give you all the UNIX tools on Windows. Cygwin is great on Windows NT/2K/XP, but for a Windows 9x box I would reccomend Activestate.com.

Once you've upgraded, try again and see if the problem exists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top