Search Results

Search: Posts Made By: BlueChris
3,727
Posted By BlueChris
In case anyone was wondering, the final all...
In case anyone was wondering, the final all singing all dancing command (having set the old string to $old and the new string to $new) is:

find . -name "*$old*" -print|awk -v n=$new -v o=$old...
3,727
Posted By BlueChris
Hmmm, answered my own question eventually, this...
Hmmm, answered my own question eventually, this line does it (for replacing 2000 with 1500):

find . -name "*2000*" -print|awk '{f=$0;gsub("2000","1500");print "sed -e 's/2000/1500/g' "f" >...
3,727
Posted By BlueChris
Replacing string in all instances (both filenames and file contents) in a directory
Hi,
I have a set of files stored in a single directory that I use to set parameters for a physics code, and I would like to streamline the process of updating them all when I change a parameter....
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 03:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy