FAQ
hi,



I've created a simple shell script to count members in my 3 lists :



******

./list_members list1 | wc -l
./list_members list2 | wc -l
./list_members list3 | wc -l

******

and I keep getting this error:



*****

wc: invalid option --
Try `wc --help' for more information.
Traceback (most recent call last):
File "./list_members", line 286, in ?
main()
File "./list_members", line 264, in main
print >> fp, formataddr((safe(name), addr))
IOError: [Errno 32] Broken pipe
****



when copying and pasting the 3 lines in my SSH window they work fine .. but when running the script I get these errors!



it was working before but recently I formatted the drive and reinstalled the system: Centos5 ..



please help







_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx

Search Discussions

  • Mark Sapiro at Mar 15, 2009 at 12:10 am

    Khalil Abbas wrote:
    I've created a simple shell script to count members in my 3 lists :



    ******

    ./list_members list1 | wc -l
    ./list_members list2 | wc -l
    ./list_members list3 | wc -l

    ******

    and I keep getting this error:



    *****

    wc: invalid option --
    Try `wc --help' for more information.
    Traceback (most recent call last):
    File "./list_members", line 286, in ?
    main()
    File "./list_members", line 264, in main
    print >> fp, formataddr((safe(name), addr))
    IOError: [Errno 32] Broken pipe
    ****

    This is a Unix question, not a Mailman question, but the answer is
    remove the trailing <CR>s from the lines of your script. They are
    confusing the shell into thinking there is another, empty argument at
    the end of the line. I.e.

    ex /path/to/script
    set ff=unix
    w
    q


    --
    Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedMar 14, '09 at 11:57p
activeMar 15, '09 at 12:10a
posts2
users2
websitelist.org

2 users in discussion

Khalil Abbas: 1 post Mark Sapiro: 1 post

People

Translate

site design / logo © 2022 Grokbase