Penguin
Diff: IORedirectionNotes
EditPageHistoryDiffInfoLikePages

Differences between version 4 and previous revision of IORedirectionNotes.

Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History

Newer page: version 4 Last edited on Monday, December 11, 2006 8:43:00 pm by BenStaz Revert
Older page: version 1 Last edited on Monday, December 11, 2006 8:28:31 pm by BenStaz Revert
@@ -5,17 +5,16 @@
 Firstly: 
  
 *sudo echo "#TEST REPOSITORY" >> /etc/apt/sources.list 
  
-Results in a "Permission denied error". Why is this? I have no idea, can anyone help out? :D  
-  
+Results in a "Permission denied error". This is because ''sudo'' ONLY applies to the echo command and nothing else.  
 Ways around this: 
  
 1) 
  
 *sudo bash -c 'echo "#TEST REPOSITORY" >> /etc/apt/sources.list' 
  
-Everything after the ''-c'' switch is read into bash
+Commands are read from string after the ''-c'' switch. 
  
 2) 
  
 *echo "#TEST REPO" | sudo tee -a /etc/apt/sources.list