Date: Wed, 29 Jul 1998 08:18:44 -0500 (CDT) From: Mark Tinguely <tinguely@plains.NoDak.edu> To: tinguely@plains.NoDak.edu, wolstena@sfu.ca Cc: alex@muse.org.au, freebsd-questions@FreeBSD.ORG Subject: Re: Moving passwd files from LINUX to FreeBSD Message-ID: <199807291318.IAA13690@plains.NoDak.edu>
next in thread | raw e-mail | index | archive | help
> I wanted to do a quick and > dirty change to the home directory path but I can't figure out how to add > a "/" to the replacement string using sed. I wanted to make a global > change to the home directory location -- /Users --> /home/edwina > > I tried: > > sed s/Users/home\/edwina/g passwd.file > passwd.new close add the single quote to the substitute command: sed 's/Users/home\/edwina/g' passwd.file > passwd.new you can do this substitution in 'vipw' with vi as the EDITOR, and it will save you the pwd_mkdb step. (ie: # setenv EDITOR /usr/bin/vi # or export EDITOR=/usr/bin/vi for sh/bash # vipw :G :1,.s/User/home\/edwina/g :wq ) --mark. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807291318.IAA13690>