{"id":93,"date":"2024-12-16T08:02:48","date_gmt":"2024-12-16T08:02:48","guid":{"rendered":"https:\/\/techkubo.com\/linux\/?p=93"},"modified":"2025-05-28T17:55:33","modified_gmt":"2025-05-28T17:55:33","slug":"linux-sed-command","status":"publish","type":"post","link":"https:\/\/techkubo.com\/linux\/linux-sed-command\/","title":{"rendered":"Linux &#8211; sed Command"},"content":{"rendered":"\n<p>The <code>sed<\/code> command stands for &#8220;stream editor.&#8221; It is used to perform basic text transformations on an input stream. The <code>sed<\/code> command is commonly used for text substitution, filtering, and other text processing tasks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Initial Example<\/h2>\n\n\n\n<p>Using <code>sed<\/code> to replace the first occurrence of the word &#8220;old&#8221; with &#8220;new&#8221; in a file called <code>file.txt<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed 's\/old\/new\/' file.txt<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SED Command<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Parameter<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>-n, --quiet, --silent<\/code><\/td><td>Suppress automatic output printing, only print lines explicitly specified<\/td><\/tr><tr><td><code>--debug<\/code><\/td><td>Output detailed execution steps for debugging purposes<\/td><\/tr><tr><td><code>-e script, --expression=script<\/code><\/td><td>Add the provided script to the list of commands to be executed<\/td><\/tr><tr><td><code>-f script-file, --file=script-file<\/code><\/td><td>Execute commands from the specified script file<\/td><\/tr><tr><td><code>--follow-symlinks<\/code><\/td><td>Follow symbolic links when making in-place edits<\/td><\/tr><tr><td><code>-i[SUFFIX], --in-place[=SUFFIX]<\/code><\/td><td>Edit files directly, optionally making a backup with the given suffix<\/td><\/tr><tr><td><code>-l N, --line-length=N<\/code><\/td><td>Set the maximum line length for the <code>l<\/code> command, wrapping lines as needed<\/td><\/tr><tr><td><code>--posix<\/code><\/td><td>Disable all GNU-specific extensions<\/td><\/tr><tr><td><code>-E, -r, --regexp-extended<\/code><\/td><td>Use extended regular expressions for pattern matching (POSIX -E for portability)<\/td><\/tr><tr><td><code>-s, --separate<\/code><\/td><td>Treat each file as a separate input stream, rather than a single continuous stream<\/td><\/tr><tr><td><code>--sandbox<\/code><\/td><td>Run in sandbox mode, disabling the <code>e<\/code>, <code>r<\/code>, and <code>w<\/code> commands for security<\/td><\/tr><tr><td><code>-u, --unbuffered<\/code><\/td><td>Minimize input buffering and flush output buffers more frequently<\/td><\/tr><tr><td><code>-z, --null-data<\/code><\/td><td>Use NUL characters to separate lines of input instead of newline characters<\/td><\/tr><tr><td><code>--help<\/code><\/td><td>Show help information and exit<\/td><\/tr><tr><td><code>--version<\/code><\/td><td>Display version information and exit<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">1. Basic Text Substitution<\/h4>\n\n\n\n<p>To replace the first occurrence of &#8220;old&#8221; with &#8220;new&#8221; in each line of a file:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed 's\/old\/new\/' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">2. Global Text Substitution<\/h4>\n\n\n\n<p>To replace all occurrences of &#8220;old&#8221; with &#8220;new&#8221; in each line of a file:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed 's\/old\/new\/g' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">3. In-Place Editing<\/h4>\n\n\n\n<p>To perform text substitution directly in the file (without creating a new file):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed -i 's\/old\/new\/g' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">4. Deleting Lines<\/h4>\n\n\n\n<p>To delete lines that match a specific pattern:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed '\/pattern\/d' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">5. Printing Specific Lines<\/h4>\n\n\n\n<p>To print only the lines that match a specific pattern:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed -n '\/pattern\/p' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">6. Replace on a Specific Line<\/h4>\n\n\n\n<p>To replace text on a specific line number (e.g., line 3):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed '3s\/old\/new\/' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">7. Using Regular Expressions<\/h4>\n\n\n\n<p>To use regular expressions for more complex text manipulation:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed 's\/[0-9]\/#\/g' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">8. Append Text After a Match<\/h4>\n\n\n\n<p>To append text after lines that match a specific pattern:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed '\/pattern\/a\\new text' filename.txt<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">9. Insert Text Before a Match<\/h4>\n\n\n\n<p>To insert text before lines that match a specific pattern:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;UNIX&quot;,&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\">sed '\/pattern\/i\\new text' filename.txt<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Linux Playground<\/h2>\n\n\n\n<iframe src=\"https:\/\/techkubo.com\/playcloud-linux-static.html\" title=\"Try Linux on TechKubo\" width=\"100%\" height=\"500\"><\/iframe>\n","protected":false},"excerpt":{"rendered":"<p>The sed command stands for &#8220;stream editor.&#8221; It is used to perform basic text transformations on an input stream. The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux - sed Command - Linux Command Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux - sed Command - Linux Command Tutorial\" \/>\n<meta property=\"og:description\" content=\"The sed command stands for &#8220;stream editor.&#8221; It is used to perform basic text transformations on an input stream. The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Command Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-16T08:02:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-28T17:55:33+00:00\" \/>\n<meta name=\"author\" content=\"Manong\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\"},\"author\":{\"name\":\"Manong\",\"@id\":\"https:\/\/techkubo.com\/linux\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\"},\"headline\":\"Linux &#8211; sed Command\",\"datePublished\":\"2024-12-16T08:02:48+00:00\",\"dateModified\":\"2025-05-28T17:55:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\"},\"wordCount\":327,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/linux\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techkubo.com\/linux\/linux-sed-command\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\",\"url\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\",\"name\":\"Linux - sed Command - Linux Command Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/linux\/#website\"},\"datePublished\":\"2024-12-16T08:02:48+00:00\",\"dateModified\":\"2025-05-28T17:55:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techkubo.com\/linux\/linux-sed-command\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/techkubo.com\/linux\/linux-sed-command\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/techkubo.com\/linux\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux &#8211; sed Command\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techkubo.com\/linux\/#website\",\"url\":\"https:\/\/techkubo.com\/linux\/\",\"name\":\"Linux Command Tutorial\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/linux\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/techkubo.com\/linux\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/techkubo.com\/linux\/#organization\",\"name\":\"Linux Command Tutorial\",\"url\":\"https:\/\/techkubo.com\/linux\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/linux\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/techkubo.com\/linux\/wp-content\/uploads\/sites\/8\/2025\/01\/cropped-Techkubo-logo-1.png\",\"contentUrl\":\"https:\/\/techkubo.com\/linux\/wp-content\/uploads\/sites\/8\/2025\/01\/cropped-Techkubo-logo-1.png\",\"width\":1617,\"height\":1184,\"caption\":\"Linux Command Tutorial\"},\"image\":{\"@id\":\"https:\/\/techkubo.com\/linux\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/techkubo.com\/linux\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\",\"name\":\"Manong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/linux\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"caption\":\"Manong\"},\"sameAs\":[\"https:\/\/techkubo.com\"],\"url\":\"https:\/\/techkubo.com\/linux\/author\/manong\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux - sed Command - Linux Command Tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techkubo.com\/linux\/linux-sed-command\/","og_locale":"en_US","og_type":"article","og_title":"Linux - sed Command - Linux Command Tutorial","og_description":"The sed command stands for &#8220;stream editor.&#8221; It is used to perform basic text transformations on an input stream. The [&hellip;]","og_url":"https:\/\/techkubo.com\/linux\/linux-sed-command\/","og_site_name":"Linux Command Tutorial","article_published_time":"2024-12-16T08:02:48+00:00","article_modified_time":"2025-05-28T17:55:33+00:00","author":"Manong","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Manong","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/#article","isPartOf":{"@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/"},"author":{"name":"Manong","@id":"https:\/\/techkubo.com\/linux\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965"},"headline":"Linux &#8211; sed Command","datePublished":"2024-12-16T08:02:48+00:00","dateModified":"2025-05-28T17:55:33+00:00","mainEntityOfPage":{"@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/"},"wordCount":327,"commentCount":0,"publisher":{"@id":"https:\/\/techkubo.com\/linux\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techkubo.com\/linux\/linux-sed-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/","url":"https:\/\/techkubo.com\/linux\/linux-sed-command\/","name":"Linux - sed Command - Linux Command Tutorial","isPartOf":{"@id":"https:\/\/techkubo.com\/linux\/#website"},"datePublished":"2024-12-16T08:02:48+00:00","dateModified":"2025-05-28T17:55:33+00:00","breadcrumb":{"@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techkubo.com\/linux\/linux-sed-command\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/techkubo.com\/linux\/linux-sed-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techkubo.com\/linux\/"},{"@type":"ListItem","position":2,"name":"Linux &#8211; sed Command"}]},{"@type":"WebSite","@id":"https:\/\/techkubo.com\/linux\/#website","url":"https:\/\/techkubo.com\/linux\/","name":"Linux Command Tutorial","description":"","publisher":{"@id":"https:\/\/techkubo.com\/linux\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techkubo.com\/linux\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techkubo.com\/linux\/#organization","name":"Linux Command Tutorial","url":"https:\/\/techkubo.com\/linux\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/linux\/#\/schema\/logo\/image\/","url":"https:\/\/techkubo.com\/linux\/wp-content\/uploads\/sites\/8\/2025\/01\/cropped-Techkubo-logo-1.png","contentUrl":"https:\/\/techkubo.com\/linux\/wp-content\/uploads\/sites\/8\/2025\/01\/cropped-Techkubo-logo-1.png","width":1617,"height":1184,"caption":"Linux Command Tutorial"},"image":{"@id":"https:\/\/techkubo.com\/linux\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/techkubo.com\/linux\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965","name":"Manong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/linux\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","caption":"Manong"},"sameAs":["https:\/\/techkubo.com"],"url":"https:\/\/techkubo.com\/linux\/author\/manong\/"}]}},"_links":{"self":[{"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/posts\/93"}],"collection":[{"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":3,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":275,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/posts\/93\/revisions\/275"}],"wp:attachment":[{"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techkubo.com\/linux\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}