Using csh for serious scripting is usually not recommended. However, that is tangential to the issue at hand. You're probably after something like: sed -e "s=$oldpath=$newpath=" where the shell variable $oldpath contains the value to be replaced and $newpath contains the replacement, and it is assumed that neither variable contains an equals sign. That is, you're allowed to choose the delimiter on pattern, and avoiding the usual / delimiter avoids problems with slashes in pathnames.
Brian Postow
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Brian
Contact Brian, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack