Search Results

Search: Posts Made By: ijustsawmars
11,311
Posted By rdcwayx
find directory -type f -name "*.html" -exe sed...
find directory -type f -name "*.html" -exe sed -i.old 's|10/31|11/30|g' {} \;

If your sed don't support -i option, replace by perl

find directory -type f -name "*.html" -exec perl -p -i.old -e...
11,311
Posted By Scrutinizer
Try: for f in *; do cp -p "$f" "$f.old" &&...
Try:
for f in *; do
cp -p "$f" "$f.old" && sed 's|10/31|11/30|g' "$f.old" > "$f"
doneor GNU:
sed -i.old 's|10/31|11/30|g' *
Showing results 1 to 2 of 2

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