Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you plan to use sed you may just want to use the following. You may not need two separate commands. Using sed you can find if the two patterns exist and if so replace both of them with one command.</p> <p>NOTE: The following contains an inline edit. PLEASE BACKUP YOUR FILE PRIOR TO TESTING</p> <pre><code>sed -i 's/&lt;link type="text\/css" rel="stylesheet" href="https:\/\/test.mydomain.com\/store.css"&gt;/&lt;REPLACE PATTERN 1&gt;/g;s/&lt;script type="text\/javascript" language="javascript" src="https:\/\/test.mydomain.com\/store\/gwt.nocache.js"&gt;/&lt;REPLACE PATTERN 2&gt;/g' /yourfile </code></pre> <p>If you are an OS X user you can try the following</p> <p>NOTE: The following contains an inline edit. PLEASE BACKUP YOUR FILE PRIOR TO TESTING</p> <pre><code>sed -i '' 's/&lt;link type="text\/css" rel="stylesheet" href="https:\/\/test.mydomain.com\/store.css"&gt;/&lt;REPLACE PATTERN 1&gt;/g;s/&lt;script type="text\/javascript" language="javascript" src="https:\/\/test.mydomain.com\/store\/gwt.nocache.js"&gt;/&lt;REPLACE PATTERN 2&gt;/g' /yourfile </code></pre> <p>Remember to escape the '/' characters in your REPLACE PATTERN if you intend on using them.</p> <p>Also you may want to try awk. In this case it functions much like grep.</p> <pre><code>awk '/&lt;link type="text\/css" rel="stylesheet" href="https:\/\/test.mydomain.com\/store.css"&gt;/; /&lt;script type="text\/javascript" language="javascript" src="https:\/\/test.mydomain.com\/store\/gwt.nocache.js"&gt;/' /yourfile </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload