If you're just looking to strip the extra ^M that Windows sticks into the files, then 
change the tr command to " tr -d '\015' "

\015 is the escape code for ^M.

---
Keith Rinaldo
Systems Administrator
College of Engineering
University of Nevada, Las Vegas


----- Original Message ----- 
From: "Ryan Novosielski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 10:10 AM
Subject: Re: LPRng: Problem with 'file'


> Nope -- the file behaves exactly the same after the tr (I redirected it to
> another file), and still will work only after being vi'd (or probably
> otherwise massaged, but this is what I know works).
> 
> ---- _  _ _  _ ___  _  _  _
> |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
> |$&| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
> \__/ Univ. of Med. and Dent. | IST/ACS - NJMS Medical Science Bldg - C630
> 
> On Tue, 24 Jun 2003, David Bear wrote:
> 
> > On Tue, Jun 24, 2003 at 10:58:39AM -0400, Ryan Novosielski wrote:
> > > So what is the appropriate way to repair such a file before it gets to the
> > > printer, then?
> >
> > if indeed it is the extra cr chars, you could
> >
> > cat file | tr -d \r | ifhp
> >
> > or something like that.  tr is fast...
> > >
> > > ---- _  _ _  _ ___  _  _  _
> > > |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
> > > |$&| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
> > > \__/ Univ. of Med. and Dent. | IST/ACS - NJMS Medical Science Bldg - C630
> > >
> > > On Fri, 20 Jun 2003, Henrik Edlund wrote:
> > >
> > > > On Fri, 20 Jun 2003, Ryan Novosielski wrote:
> > > >
> > > > RN> I am printing via the HP 2500cm driver for Win2k, which sends some PJL and
> > > > RN> says @PJL ENTER LANGUAGE=PCL3GUI. That's just fine. The problem is that
> > > > RN> 'file' claims that the file is of type 'data'. I vi'd the file, did
> > > > RN> nothing to it, saved it, and ran file again -- now it recognizes it as a
> > > > RN> HP Printer Job Language. The file appears to have the proper PJL header,
> > > > RN> with the ^[%-12345X -- forgive me if I'm getting that wrong off the top of
> > > > RN> my head. Unfortunately, though, as printed, file calls it data and runs
> > > > RN> off a page that says "No conversion available for type 'data'".
> > > > RN>
> > > > RN> Any clues here?
> > > >
> > > > Could it be the file contain CR (carriage return)? Windows machines puts
> > > > both NL and CR and end of lines. How it becomes "data" I don't know, but
> > > > as it was okay after you saved it (on UNIX I presume) it sounds familiar.
> > > >
> > > > -----------------------------------------------------------------------------
> > > > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> > > > The address you post from MUST be your subscription address
> > > >
> > > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> > > > or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
> > > > to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> > > > with:                           | example:
> > > > subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
> > > > unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]
> > > >
> > > > If you have major problems,  send email to [EMAIL PROTECTED] with the word
> > > > LPRNGLIST in the SUBJECT line.
> > > > -----------------------------------------------------------------------------
> > > >
> > >
> > > -----------------------------------------------------------------------------
> > > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> > > The address you post from MUST be your subscription address
> > >
> > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> > > or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
> > > to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> > > with:                           | example:
> > > subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
> > > unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]
> > >
> > > If you have major problems,  send email to [EMAIL PROTECTED] with the word
> > > LPRNGLIST in the SUBJECT line.
> > > -----------------------------------------------------------------------------
> >
> > --
> > David Bear
> > phone: 480-965-8257
> > fax: 480-965-9189
> > College of Public Programs/ASU
> > Wilson Hall 232
> > Tempe, AZ 85287-0803
> >  "Beware the IP portfolio, everyone will be suspect of trespassing"
> >
> > -----------------------------------------------------------------------------
> > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> > The address you post from MUST be your subscription address
> >
> > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> > or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
> > to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> > with:                           | example:
> > subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
> > unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]
> >
> > If you have major problems,  send email to [EMAIL PROTECTED] with the word
> > LPRNGLIST in the SUBJECT line.
> > -----------------------------------------------------------------------------
> >
> 
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
> 
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
> to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> with:                           | example:
> subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]
> 
> If you have major problems,  send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
> 

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to