Date: Mon, 29 Mar 2010 20:58:13 -0500 From: Programmer In Training <pit@joseph-a-nagy-jr.us> To: freebsd-questions@freebsd.org Subject: Re: Enough Is Enough Message-ID: <4BB15AB5.6070808@joseph-a-nagy-jr.us> In-Reply-To: <1269787599.6000.15.camel@localhost> References: <4BAE3E5C.8020905@joseph-a-nagy-jr.us> <1269787599.6000.15.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On 03/28/10 09:46, Sergio de Almeida Lenzi wrote:
<snip>
> this scripts outputs the commands needed to fix the system
I'm having some problems with the script.
> watch out
> ==================================
> #!/bin/sh
>
> endp() {
> rm -f $t
> exit $1
> }
>
> t=/tmp/$$
>
> if [ $# -ne 1 ]
> then
> echo use $0 library
> endp 1
> fi
>
> lib=$1
>
> find /usr/local/bin /usr/local/lib -name -type f | \
Is the 'f' a typo? I had to remove it because find kept on erroring on it.
> while read x
> do
> grep $lib $x | \
> awk '{print $3}' | \
> while read y
> do
> pkg_info -W $y >> $t
> done
> done
> awk '{print $NF}' $t | sort -u > /tmp/buildpkglist
> echo nice portmaster -Bdg `cat /tmp/buildpkglist`
> endp 0
The final output (after removing the stray 'f'):
./portmaster-script jpeg
awk: can't open file /tmp/42352
source line number 1
nice portmaster -Bdg
ran as regular user and root to no different affect.
I switched out all instances of awk for grep with the following result:
./portmaster-script jpeg
grep: /tmp/42436: No such file or directory
nice portmaster -Bdg
Thanks for the suggestion, but this script doesn't seem to work on my
system and I can't seem to figure out what exactly is causing it to fail.
--
Yours In Christ,
PIT
Emails are not formal business letters, whatever businesses may want.
Original content copyright under the OWL http://owl.apotheon.org
Please do not CC me. If I'm posting to a list it is because I am subscribed.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iQEcBAEBAgAGBQJLsVrIAAoJEENZQ8DH7rW02UcH/iyHguE+GS6EK7nUiUs8wX8P
GZcEemuJpnasc0HwyRsPxca9FeQKKAT/LRo+yy7rABnkO7JDlPYDi1I9etuJIioU
ry6JzQI9Uq9YRznTJ1Mu6PrjrM262DtbWlSvJlMOVMy4amgWcdu6GkXRuh0/E7gw
4+NEf8KZjWA/h2sussbu8GwptAQ3E8F8EAFDKVgOatLLvShgaCt+Q9T1CPkksPZs
bb2xSb0noCr8Z6stID0SRh7OkDshVZpFvKGXWdcioscNyiwsbpFHrKp9uMgQW6+D
QLoN+gbIZRpiriGht/gUAyXrN8gNh6EFnF1Kzza5cItzcKuuiaTQ2pXgqz7c7Bo=
=Lh32
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BB15AB5.6070808>
