On Tue, Nov 23, 2010 at 11:29:47PM +0530, Narendra Sisodiya wrote:
> Following command will list out the dependency of a package.
> sudo apt-get install --dry-run eclipse  | sed -n '/The following NEW/{n; :a;
> $!N;s/\n[[:blank:]][[:blank:]]/ /;ta;P;D;}'
> sudo apt-get install --dry-run expect  | sed -n '/The following NEW/{n; :a;
> $!N;s/\n[[:blank:]][[:blank:]]/ /;ta;P;D;}'

Cool!
Any way to put it into a shell script/alias? Something like:

sudo apt-get install --dry-run $1 | sed -n....

So that "$1" accepts the value given while running that script.

I'm very low on scripting-fu, but like to turn long commands in to aliases
so that I need to type least. :)


-- 
Regards,
Nitesh Mistry | www.mistrynitesh.com
PGP key id: A6FEF696 | 'geekosopher' on freenode irc

Attachment: signature.asc
Description: Digital signature

-- 
ubuntu-in mailing list
ubuntu-in@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-in

Reply via email to