Asdcarl.111 net.news utzoo!decvax!ucbvax!ucsfcgl!sdcarl!rusty Mon Dec 7 21:32:34 1981 Bnews conversion Re: eagle!jal's shell script for making your .newsrc file, you may not have the program "cut", here is the equivalent script that uses "sed": UID=`grep "^$LOGNAME:" /etc/passwd | sed -e 's/\(.*\):\(.*\):\([0-9][0-9]*\):\([0-9][0-9]\):\(.*\):\(.*\):\(.*\)/\3/'` SUBS=`grep "^$UID" /usr/spool/news/.uindex | sed -e 's/.*://' | tr "," "\040"` echo "options -n $SUBS" > $HOME/.newsrc echo '$HOME/.newsrc' created The first line that sets UID has a hairy re for sed; I confess to not being to handy with re's. You may have to do something different to get $LOGNAME, use `whoami` for instance. Same caveats apply to $HOME. ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.