You are not logged in.
Is there a way to wrap commands for use with sudo, such that my below command would work:
$ sudo (pacman -Sy && pacman -Su)
bash: syntax error near unexpected token `pacman'
Note: The above is just an example of what I want to do, I would normally use 'pacman -Syu'
Last edited by deltaecho (2008-09-15 06:18:24)
Dylon
Offline
You could simply alias it with pacman. This is what I do, and I know I'm not alone.
In .bashrc:
alias pacman='sudo pacman'
And I also have it set to not ask for a password with pacman in my sudoers file.
Offline
sudo sh -c "pacman -Sy && pacman -Su"
sudo sh -c "command_a | command_b >file_c"
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Great - those are both good suggestions! Thank you.
Dylon
Offline