Re: Cvsup script question
On Mon, Aug 25, 2003 at 03:32:25PM +0100 or thereabouts, Marco Gon?alves wrote: > Hi, i did some minor alterations to the script by > > #!/usr/local/bin/bash > > /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for errors > /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only errors > /usr/local/sbin/pkgdb -aF > /bin/echo > /bin/echo "Updated ports:" > /usr/local/sbin/portversion | grep "<" # Show only changed ports > > but strangly, at least for me, is that the 2nd line the output is > not being redirected to /dev/null and if i execute this script i > still get lots of output... I bet portsdb is putting its progress messages on standard output. (Programs seem to do that a lot, since stderr is unbuffered). Try: /usr/local/sbin/portsdb -Uu >/dev/null 2>&1 || { echo "FAILED to run portsdb"; exit 1 } That will not give you the error output, but if there's an error it will say so and exit. (You can run portsdb manually and see!) -- Josh ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Cvsup script question
Hi, i did some minor alterations to the script by #!/usr/local/bin/bash /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for errors /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only errors /usr/local/sbin/pkgdb -aF /bin/echo /bin/echo "Updated ports:" /usr/local/sbin/portversion | grep "<" # Show only changed ports but strangly, at least for me, is that the 2nd line the output is not being redirected to /dev/null and if i execute this script i still get lots of output... - Original Message - From: Lowell Gilbert To: Charles Howse Cc: [EMAIL PROTECTED] Sent: Friday, August 22, 2003 4:24 PM Subject: Re: Cvsup script question "Charles Howse" <[EMAIL PROTECTED]> writes: > Hi, > I'm cvsup'ing from a script in /usr/local/etc/periodic/daily. > Here 'tis: > > #!/usr/local/bin/bash > Echo > Echo "Output of cvsup:" > /usr/local/bin/cvsup -g -L 2 /etc/cvsupfile > Echo > Echo "Output of portsdb:" > /usr/local/sbin/portsdb -Uu > Echo > Echo "Output of portversion:" > /usr/local/sbin/portversion > > It works, but (1) produces a ton of output, (2) I'm seeing a lot of > lines in the output of portsdb that say, "(some port) non-existent, > dependency list incomplete". > > Are those lines in the output of portsdb coming from STDOUT or STDERR, > or are they completely normal? > > How about we alter the script as follows to keep the output down a > little?#!/usr/local/bin/bash > /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for > errors > /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only > errors > Echo > Echo "Updated ports:" > /usr/local/sbin/portversion | grep "<" # Show only changed ports > > > > Will these changes break anything? No. If in doubt, redirect to files instead of to /dev/null. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Cvsup script question
"Charles Howse" <[EMAIL PROTECTED]> writes: > Hi, > I'm cvsup'ing from a script in /usr/local/etc/periodic/daily. > Here 'tis: > > #!/usr/local/bin/bash > Echo > Echo "Output of cvsup:" > /usr/local/bin/cvsup -g -L 2 /etc/cvsupfile > Echo > Echo "Output of portsdb:" > /usr/local/sbin/portsdb -Uu > Echo > Echo "Output of portversion:" > /usr/local/sbin/portversion > > It works, but (1) produces a ton of output, (2) I'm seeing a lot of > lines in the output of portsdb that say, "(some port) non-existent, > dependency list incomplete". > > Are those lines in the output of portsdb coming from STDOUT or STDERR, > or are they completely normal? > > How about we alter the script as follows to keep the output down a > little? > > #!/usr/local/bin/bash > /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for > errors > /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only > errors > Echo > Echo "Updated ports:" > /usr/local/sbin/portversion | grep "<" # Show only changed ports > > Will these changes break anything? No. If in doubt, redirect to files instead of to /dev/null. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Cvsup script question
Hi, I'm cvsup'ing from a script in /usr/local/etc/periodic/daily. Here 'tis: #!/usr/local/bin/bash Echo Echo "Output of cvsup:" /usr/local/bin/cvsup -g -L 2 /etc/cvsupfile Echo Echo "Output of portsdb:" /usr/local/sbin/portsdb -Uu Echo Echo "Output of portversion:" /usr/local/sbin/portversion It works, but (1) produces a ton of output, (2) I'm seeing a lot of lines in the output of portsdb that say, "(some port) non-existent, dependency list incomplete". Are those lines in the output of portsdb coming from STDOUT or STDERR, or are they completely normal? How about we alter the script as follows to keep the output down a little? #!/usr/local/bin/bash /usr/local/bin/cvsup -g -L 0 /etc/cvsupfile # Keep quiet except for errors /usr/local/sbin/portsdb -Uu > /dev/null # Hopefully, show only errors Echo Echo "Updated ports:" /usr/local/sbin/portversion | grep "<" # Show only changed ports Will these changes break anything? Thanks, Charles ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"