Re: uninstalled packages in 'dpkg -l'
On Thu, 16 May 1996, Craig Sanders wrote:
>
>
> If you do this a lot, write a shell alias (bash aliases can't handle
> arguments, unfortunately), function or shell script to do it for you.
>
> NOTE: be wary of shell functions (and aliases too)...even if you define
> them in your ~/.bashrc so that they are available from the command
> line, they will NOT be exutable to programs forked by the shell. e.g. a
> function is not available in situations like 'find . -blahblah | xargs
> myfunction". xargs will have no idea what "myfunction" is. If you need
> to be able to call it from another program then write a script.
>
This may be right but you can use shell functions if you use the '`'
style of doing things
ie.
function fred() { echo 'hello' $i; }
for i in `find . -name 'debian' -print` ; do fred $i ; done
will generate the expected results.
Joe.
Reply to: