Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer > Re: ksh scripti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 992 of 1040
Post > Topic >>

Re: ksh scripting problem

by Robert Peirce <bob@[EMAIL PROTECTED] > Feb 8, 2008 at 04:53 PM

Okay.  Here's a real puzzle and I don't think it has anything to do with 
\r.

This doesn't work.  It hangs at the if statement, which doesn't execute.
        p=$(echo $line | tr -d '\r')
        ((++wkcnt))
        if      ((p>0))
 
This does work
        p=$(echo $line | tr -d '\r')
        ((++wkcnt))
        #
        if      ((p>0))

As does this
        ((++wkcnt))
        p=$(echo $line | tr -d '\r')
        if      ((p>0))
 
You need something after ((++wkcnt)) for if to work and that makes no 
sense to me at all.

-- 
Robert B. Peirce, Venetia, PA  724-941-6883
bob AT peirce-family.com [Mac]
rbp AT cooksonpeirce.com [Office]
 




 4 Posts in Topic:
ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 15:15:13 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 16:05:51 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 16:53:31 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 18:41:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 10:01:36 CST 2008.