Discussion: to edit PATH
Afficher un message
Vieux 20/08/2006, 11h17   #3
Chris F.A. Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: to edit PATH

On 2006-08-20, virus wrote:
>


> I'd like to write a script that adds the current directory to the
> line in .bash_profile.


Don't.

While adding the current directory to the PATH is a minor security
risk, it is unnecessary.

> I'm not too familiar with sed so , is it possible to do this solely
> from the bash shell, or can someone suggest a script using sed ?


printf "\nPATH=%s:$PATH\n" "." >> $HOME/.bashrc

--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
  Réponse avec citation
 
Page generated in 0,06414 seconds with 9 queries