<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Sed-Stream-Editor%2FC3%2FAdvanced-Sed-Command%2FEnglish</id>
		<title>Sed-Stream-Editor/C3/Advanced-Sed-Command/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Sed-Stream-Editor%2FC3%2FAdvanced-Sed-Command%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Sed-Stream-Editor/C3/Advanced-Sed-Command/English&amp;action=history"/>
		<updated>2026-04-29T21:07:46Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Sed-Stream-Editor/C3/Advanced-Sed-Command/English&amp;diff=54985&amp;oldid=prev</id>
		<title>Nancyvarkey at 07:16, 5 April 2021</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Sed-Stream-Editor/C3/Advanced-Sed-Command/English&amp;diff=54985&amp;oldid=prev"/>
				<updated>2021-04-05T07:16:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:16, 5 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''gedit''' text editor&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''gedit''' text editor&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;However, you can use any other editor of your choice.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;However, you can use any other &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;editor&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''' &lt;/ins&gt;of your choice.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide 4:'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide 4:'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 200:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let us cross-check the changes in the files.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Let us cross-check the changes in the files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In downloads, &lt;/del&gt;go to the folder Python_ProjectFile'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Downloads'''&amp;gt;&amp;gt; &lt;/ins&gt;go to the folder &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;Python_ProjectFile'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;Open the file with .py extension &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;highlight the replaced string&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Open the file with .py extension &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;gt; &lt;/ins&gt;highlight the replaced string&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Go to the folder '''Python_ProjectFiles.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| Go to the folder '''Python_ProjectFiles.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 258:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 258:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''websitelist '''contains the list of '''site '''names. We have 3 '''website '''names here.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''websitelist '''contains the list of '''site '''names. We have 3 '''website '''names here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''' '''&lt;/del&gt;another empty folder named as''' sitefiles '''where the output will get stored.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There is another empty folder named as''' sitefiles '''where the output will get stored.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here a separate '''config file''' will be created for each '''website''' with the necessary changes in the file.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Here a separate '''config file''' will be created for each '''website''' with the necessary changes in the file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 312:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 312:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| In this tutorial, we learnt how '''sed commands''' can be used by *'''Programmers''' and&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| In this tutorial, we learnt how '''sed commands''' can be used by &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''Programmers''' and&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''System Administrators'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''System Administrators'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 320:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 321:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| As an assignment do the following&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| As an assignment do the following&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Change the content of '''websitelist '''file for the below '''Google products'''.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Change the content of '''websitelist '''file for the below '''Google products'''.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/ins&gt;*'''google.com'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;*'''google.com'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/ins&gt;*'''drive.google.com'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;*'''drive.google.com'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;#&lt;/ins&gt;*'''meet.google.com'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;*'''meet.google.com'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Execute the''' for loop command''' as explained in the tutorial.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Execute the''' for loop command''' as explained in the tutorial.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Check the output inside the '''sitefiles '''folder&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Check the output inside the '''sitefiles '''folder.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide 10:'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|| '''Slide 10:'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nancyvarkey</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Sed-Stream-Editor/C3/Advanced-Sed-Command/English&amp;diff=54964&amp;oldid=prev</id>
		<title>Nirmala Venkat: Created page with &quot;  {| border=&quot;1&quot; |- || '''VISUAL CUE''' || '''NARRATION''' |- || '''Slide 1:''' ||Welcome to the spoken tutorial''' '''on '''Advanced''' '''Sed Command.''' |- || '''Slide 2:'''...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Sed-Stream-Editor/C3/Advanced-Sed-Command/English&amp;diff=54964&amp;oldid=prev"/>
				<updated>2021-04-01T06:31:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;  {| border=&amp;quot;1&amp;quot; |- || &amp;#039;&amp;#039;&amp;#039;VISUAL CUE&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;NARRATION&amp;#039;&amp;#039;&amp;#039; |- || &amp;#039;&amp;#039;&amp;#039;Slide 1:&amp;#039;&amp;#039;&amp;#039; ||Welcome to the spoken tutorial&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;on &amp;#039;&amp;#039;&amp;#039;Advanced&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Sed Command.&amp;#039;&amp;#039;&amp;#039; |- || &amp;#039;&amp;#039;&amp;#039;Slide 2:&amp;#039;&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|| '''VISUAL CUE'''&lt;br /&gt;
|| '''NARRATION'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 1:'''&lt;br /&gt;
||Welcome to the spoken tutorial''' '''on '''Advanced''' '''Sed Command.'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 2:'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
||In this tutorial,we will learn how '''sed commands''' can be used by &lt;br /&gt;
* '''Programmers''' and&lt;br /&gt;
* '''System Administrators'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 3:'''&lt;br /&gt;
&lt;br /&gt;
'''System requirements'''&lt;br /&gt;
||This tutorial is recorded using&lt;br /&gt;
* '''Ubuntu Linux '''OS version 18.04 and&lt;br /&gt;
* '''gedit''' text editor&lt;br /&gt;
&lt;br /&gt;
However, you can use any other editor of your choice.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 4:'''&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
|| To follow this tutorial, you should know basics of&lt;br /&gt;
* '''Linux'''&lt;br /&gt;
* '''C programming'''&lt;br /&gt;
* '''Python programming''' and&lt;br /&gt;
* '''Bash shell script'''&lt;br /&gt;
&lt;br /&gt;
If not, for relevant tutorials please visit our website.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 5:'''&lt;br /&gt;
&lt;br /&gt;
'''Code files '''&lt;br /&gt;
||&lt;br /&gt;
*The files used in this tutorial are available in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract them&lt;br /&gt;
* Make a copy and then use them while practising&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Open the terminal'''&lt;br /&gt;
&lt;br /&gt;
|| Open the '''terminal''' by pressing'''Ctrl+Alt+T''' keys simultaneously.&lt;br /&gt;
&lt;br /&gt;
Please remember to press the '''Enter''' key after typing every '''command'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| First we will see how the '''sed commands''' are useful with '''C source code'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Go to Downloads folder'''&lt;br /&gt;
&lt;br /&gt;
'''Open the two c Programs in gedit text editor'''&lt;br /&gt;
&lt;br /&gt;
'''Scroll down and show the content of the file and highlight the functions'''&lt;br /&gt;
&lt;br /&gt;
|| In the '''Downloads''' folder, I have saved two '''C programs''' inside the''' C_Files '''folder.&lt;br /&gt;
&lt;br /&gt;
Let us open these '''program files''' in the '''text editor'''.&lt;br /&gt;
&lt;br /&gt;
I’ll show how to print only the '''function''' names in the '''program''' using '''sed command'''.&lt;br /&gt;
&lt;br /&gt;
Close the file.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Switch back to the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''&amp;gt; cd Downloads/C_Files'''&lt;br /&gt;
&lt;br /&gt;
'''find -name &amp;quot;*.c&amp;quot; -print -exec sed -n '/(.*);/p' {} \;'''&lt;br /&gt;
&lt;br /&gt;
'''highlight find -name &amp;quot;*.c&amp;quot; &lt;br /&gt;
|| Go to the folder where you have saved the''' C_Files '''directory.&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
This '''find command''' will search for all filenames with''' .c extension'''&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
'''Highlight /(.*);/'''&lt;br /&gt;
|| Then it will find all the '''function''' names used in these '''C programs''' inside the''' C_Files''' folder.&lt;br /&gt;
&lt;br /&gt;
It will match the open and close brackets with any '''string parameter'''. &lt;br /&gt;
&lt;br /&gt;
It will also match the '''semicolons''' at the end''' '''which indicates the end of the '''statement.'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Show the output'''&lt;br /&gt;
|| The output prints all the '''function''' names from both the''' C program files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''&amp;gt; cat Primenumber.c'''&lt;br /&gt;
'''Highlight n1 and n2 '''&lt;br /&gt;
|| Next, let us see the '''source code''' of '''Primenumber.c '''using the '''cat command'''.&lt;br /&gt;
&lt;br /&gt;
What if we wish to change the '''variable''' name in the '''source code'''?&lt;br /&gt;
&lt;br /&gt;
For example-&lt;br /&gt;
&lt;br /&gt;
Let us change the '''variable n1''' to '''number1 '''and''' n2 '''to''' number2''' in this '''program'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''sed -e 's/n1/number1/g' -e 's/n2/number2/g' Primenumber.c'''&lt;br /&gt;
|| Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Highlight number1, number2 in the output'''&lt;br /&gt;
&lt;br /&gt;
'''(int number1, number2…)'''&lt;br /&gt;
|| Observe the output.&lt;br /&gt;
&lt;br /&gt;
With a single '''command''', the '''programmers''' can make changes in the '''function''' name or '''variable''' name.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Python source code'''&lt;br /&gt;
|| Next let’s see how '''sed commands''' are used with '''Python program files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Go to '''Downloads''' folder and point to '''Python_ProjectFiles'''&lt;br /&gt;
&lt;br /&gt;
'''Open the folder and show the files.'''&lt;br /&gt;
|| I have saved a sample '''Python_ProjectFiles''' directory inside the '''Downloads''' folder.&lt;br /&gt;
&lt;br /&gt;
It has three '''Python program files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Open the three files and arrange it in the same window'''&lt;br /&gt;
&lt;br /&gt;
'''Press CTRL +F and type ConnectionDatabase'''&lt;br /&gt;
&lt;br /&gt;
'''and highlight ConnectionDatabase'''&lt;br /&gt;
|| Let us see the source code of these '''files'''.&lt;br /&gt;
&lt;br /&gt;
First I will search for the word “'''ConnectionDatabase'''” in all these '''files'''.&lt;br /&gt;
&lt;br /&gt;
I wish to replace “'''DatabaseConnection”''' instead of''' “ConnectionDatabase” '''in all occurrences.&lt;br /&gt;
&lt;br /&gt;
Let us see how to do this using '''sed'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
'''Type'''&lt;br /&gt;
&lt;br /&gt;
'''cd ..'''&lt;br /&gt;
'''&amp;gt;cd Python_ProjectFile'''&lt;br /&gt;
|| Switch back to '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
Go to the folder where the '''Python programs''' are saved on your machine.&lt;br /&gt;
|-&lt;br /&gt;
||'''sed -n '/ConnectionDatabase/p' *.py'''&lt;br /&gt;
|| Type the '''command''' as shown to search '''ConnectionDatabase '''in all the '''Python files'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Highlight the output'''&lt;br /&gt;
||The above '''command''' will show the lines where ''''ConnectionDatabase'''' is present.&lt;br /&gt;
&lt;br /&gt;
But it does not show the filename.&lt;br /&gt;
|-&lt;br /&gt;
||'''find -name &amp;quot;*.py&amp;quot; -print -exec sed -n '/ConnectionDatabase/p' {} \;'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight find and sed'''&lt;br /&gt;
&lt;br /&gt;
'''Highlight'''&lt;br /&gt;
'''find -name &amp;quot;*.py&amp;quot; -print -exec '''&lt;br /&gt;
'''Highlight'''&lt;br /&gt;
'''sed -n '/ConnectionDatabase/p' {} \;'''&lt;br /&gt;
|| Now type this '''command''' on the '''terminal'''.&lt;br /&gt;
This will fetchthe filename followed by the matched '''pattern'''within that file.&lt;br /&gt;
&lt;br /&gt;
Here we have combined the '''find unix command''' and '''sed command'''.&lt;br /&gt;
&lt;br /&gt;
This '''find command'''will find all the filenames with '''.py extension.'''&lt;br /&gt;
&lt;br /&gt;
Then it will print the filenames on the '''terminal''' and provide the input to the '''sed command'''.&lt;br /&gt;
&lt;br /&gt;
Finally the '''sed command''' processes the file based on the '''pattern''' we specified.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Highlight the output'''&lt;br /&gt;
||Now we see the information about the filename and matched '''pattern''' in that file.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
||Next, we will search &amp;quot;'''ConnectionDatabase'''&amp;quot; and replace it with &amp;quot;'''DatabaseConnection'''&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
||'''find -name &amp;quot;*.py&amp;quot; -print -exec sed -n 's/ConnectionDatabase/DatabaseConnection/gp' {} \;'''&lt;br /&gt;
&lt;br /&gt;
|| For that, type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
We have successfully replaced the word '''ConnectionDatabase''' with '''  DatabaseConnection.'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Highlight the output in the terminal window'''&lt;br /&gt;
|| However, the output has not been saved into any file.&lt;br /&gt;
&lt;br /&gt;
It is just displayed on the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
||'''find -name &amp;quot;*.py&amp;quot; -print -exec sed -i's/ConnectionDatabase/DatabaseConnection/g' {} \;'''&lt;br /&gt;
&lt;br /&gt;
||To make changes in the original file,''' '''type the same '''command''' with '''-i, '''as shown.&lt;br /&gt;
&lt;br /&gt;
This '''command''' will make the replacement changes in the '''Python files'''.&lt;br /&gt;
&lt;br /&gt;
Let us cross-check the changes in the files.&lt;br /&gt;
|-&lt;br /&gt;
|| '''In downloads, go to the folder Python_ProjectFile'''&lt;br /&gt;
&lt;br /&gt;
'''Open the file with .py extension and highlight the replaced string'''&lt;br /&gt;
|| Go to the folder '''Python_ProjectFiles.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''Python source code''' in the '''text editor'''.&lt;br /&gt;
&lt;br /&gt;
We can see that we have successfully replaced the '''string''' in the '''.py files'''.&lt;br /&gt;
&lt;br /&gt;
This feature is very helpful for '''programmers''' to replace certain '''code''' in the entire project file.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Bash'''&lt;br /&gt;
|| Next we will see how '''sed commands''' are used in '''Bash shell scripts'''.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 6: '''&lt;br /&gt;
&lt;br /&gt;
'''Linux - System Administrators'''&lt;br /&gt;
|| Let us see an example of how '''System Administrators''' manage the '''configuration files''' on the '''server'''.&lt;br /&gt;
&lt;br /&gt;
'''System Administrators''' mostly work with configuration files for multiple sites.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 7:'''&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
|| As an example, we will learn to create a separate '''apache config''' file for a list of '''websites'''. &lt;br /&gt;
&lt;br /&gt;
For this, we need to have two files&lt;br /&gt;
#A template of '''apache''' '''config '''and&lt;br /&gt;
#A list of '''website''' names&lt;br /&gt;
&lt;br /&gt;
We can do this task using only a single one line '''command'''.&lt;br /&gt;
&lt;br /&gt;
Or we can do this by copying a file and changing the '''website''' name at each place in the '''config file'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Let us learn how to do this task.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Go to the Downloads folder.'''&lt;br /&gt;
&lt;br /&gt;
'''Locate BASH_Example'''&lt;br /&gt;
&lt;br /&gt;
'''Point to 000-default.conf '''and '''website_list.'''&lt;br /&gt;
&lt;br /&gt;
'''open 000-default.conf in gedit'''&lt;br /&gt;
&lt;br /&gt;
'''open websitelist in gedit'''&lt;br /&gt;
&lt;br /&gt;
'''Point to sitefiles folder'''&lt;br /&gt;
|| Go to the '''Downloads '''folder.&lt;br /&gt;
&lt;br /&gt;
Here I have saved a '''BASH_Example''' directory.&lt;br /&gt;
&lt;br /&gt;
Inside this, I have saved two '''text files''' named '''000-default.conf '''and '''websitelist.'''&lt;br /&gt;
&lt;br /&gt;
Let us open '''000-default.conf'''. This is the template of '''apache config''' file.&lt;br /&gt;
&lt;br /&gt;
'''websitelist '''contains the list of '''site '''names. We have 3 '''website '''names here.&lt;br /&gt;
&lt;br /&gt;
There is''' '''another empty folder named as''' sitefiles '''where the output will get stored.&lt;br /&gt;
&lt;br /&gt;
Here a separate '''config file''' will be created for each '''website''' with the necessary changes in the file.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Type'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;cd ..'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt; cd Bash_Example '''&lt;br /&gt;
&lt;br /&gt;
|| Let us see the command to do this. &lt;br /&gt;
&lt;br /&gt;
Switch back to the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
Go to the folder '''Bash_Example '''where the required files are saved.&lt;br /&gt;
|-&lt;br /&gt;
|| '''for i in $(cat websitelist); do sed &amp;quot;s/localhost/$i/&amp;quot; 000-default.conf &amp;gt; sitefiles/$i.conf; done'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#000000;&amp;quot;&amp;gt;'''Highlight for i in $(cat websitelist)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#000000;&amp;quot;&amp;gt;'''Highlight sed &amp;quot;s/localhost/$i/&amp;quot; 000-default.conf'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#000000;&amp;quot;&amp;gt;'''Highlight &amp;gt; sitefiles/$i.conf; done'''&lt;br /&gt;
&lt;br /&gt;
|| Type the '''for loop command '''as shown and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
In this '''Bash script, '''the '''for loop''' is used for fetching all the '''site '''names from the '''websitelist''' file.&lt;br /&gt;
&lt;br /&gt;
Next we are replacing it with '''localhost''' in the file '''000-default.conf'''&lt;br /&gt;
&lt;br /&gt;
Then we are storing the output of the '''sed command''' in a separate file within '''sitefiles''' folder.&lt;br /&gt;
&lt;br /&gt;
Each file is saved with a specific '''site '''name and '''.conf extension'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Go to the '''sitefiles''' folder.&lt;br /&gt;
&lt;br /&gt;
Point to the three files.&lt;br /&gt;
&lt;br /&gt;
Open a file and highlight &lt;br /&gt;
|| Let us now check the output.&lt;br /&gt;
&lt;br /&gt;
Go to the '''sitefiles''' folder. We can see three separate '''config''' files, as expected.&lt;br /&gt;
&lt;br /&gt;
Open each file and check the replacement in the place of '''localhost'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Understanding '''sed commands''' will surely make the '''System Administrator's '''daily task easy. &lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 9:'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|| With this we come to the end of this tutorial. Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| In this tutorial, we learnt how '''sed commands''' can be used by *'''Programmers''' and&lt;br /&gt;
*'''System Administrators'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 8:'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment:'''&lt;br /&gt;
|| As an assignment do the following&lt;br /&gt;
#Change the content of '''websitelist '''file for the below '''Google products'''.&lt;br /&gt;
&lt;br /&gt;
**'''google.com'''&lt;br /&gt;
**'''drive.google.com'''&lt;br /&gt;
**'''meet.google.com'''&lt;br /&gt;
&lt;br /&gt;
#Execute the''' for loop command''' as explained in the tutorial.&lt;br /&gt;
#Check the output inside the '''sitefiles '''folder'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 10:'''&lt;br /&gt;
&lt;br /&gt;
'''(About Spoken Tutorial Project)'''&lt;br /&gt;
|| The video at the following link, summarizes the''' Spoken Tutorial '''project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 11:'''&lt;br /&gt;
&lt;br /&gt;
'''(About Spoken Tutorial Project)'''&lt;br /&gt;
|| The '''Spoken Tutorial''' Project Team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 12:'''&lt;br /&gt;
&lt;br /&gt;
'''Forum questions:'''&lt;br /&gt;
|| Please post your timed queries on this forum.&lt;br /&gt;
|-&lt;br /&gt;
||'''Slide 13: Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
|| Spoken Tutorial project is funded by the Ministry of Education (MoE), Govt. of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
||This is Pooja from Spoken Tutorial project signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Nirmala Venkat</name></author>	</entry>

	</feed>