How to use SED to search and replace a string in multiple files in linux

You can use the SED linux command to search and replace a string within all files inside a directory:

This example replaces all occurrences of fast with slow in file names that end in .htm:

$ find ./* -name ‘*.htm*’ -type f -exec sed -i ‘s/fast/slow/g’ {} \;


(5) 2N1304 NOS Vintage Texas Inst Germanium Transistor -USA Seller (Free Ship) picture

(5) 2N1304 NOS Vintage Texas Inst Germanium Transistor -USA Seller (Free Ship)

$24.99



200pcs NPN / PNP 10 Value Precision Transistor Assortment Kit picture

200pcs NPN / PNP 10 Value Precision Transistor Assortment Kit

$9.75



+ 100pcs Vintage Germanium transistor USSR P-N-P MP41 (МП41) ~ AC540  picture

+ 100pcs Vintage Germanium transistor USSR P-N-P MP41 (МП41) ~ AC540

$19.90



20, 50, or 100pcs 2n2222A General Purpose NPN Transistor TO-92 USA SOLD/SHIP picture

20, 50, or 100pcs 2n2222A General Purpose NPN Transistor TO-92 USA SOLD/SHIP

$4.65



2N2222A 2N2222 (10 pcs)  TO-92 NPN Transistor - Free & Fast shipping picture

2N2222A 2N2222 (10 pcs) TO-92 NPN Transistor - Free & Fast shipping

$2.75



100pcs 2n3904 General Purpose NPN Transistor TO-92 SOLD/SHIP USA  picture

100pcs 2n3904 General Purpose NPN Transistor TO-92 SOLD/SHIP USA

$5.99



TO-92 NPN PNP Transistors Assortment Kit 15 Values X 40pcs=600pcs With Storage picture

TO-92 NPN PNP Transistors Assortment Kit 15 Values X 40pcs=600pcs With Storage

$11.99



10PCS MJ15003G Complementary Silicon Power Transistors 250 W TO-3 New Original picture

10PCS MJ15003G Complementary Silicon Power Transistors 250 W TO-3 New Original

$5.00



2N6287 Original Pulled ST Transistor 100V 10A 160W PNP TO-3 picture

2N6287 Original Pulled ST Transistor 100V 10A 160W PNP TO-3

$10.95



50~100Pcs 2N5401 2N5551 2N3904 2N3906 2A2222A 2A2907  Transistor Triode TO-92 picture

50~100Pcs 2N5401 2N5551 2N3904 2N3906 2A2222A 2A2907 Transistor Triode TO-92

$3.19



Powered by WordPress. Designed by WooThemes