{"id":6518,"date":"2023-12-28T05:35:00","date_gmt":"2023-12-28T12:35:00","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=6518"},"modified":"2023-12-28T05:36:42","modified_gmt":"2023-12-28T12:36:42","slug":"uniq-linux-command","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/uniq-linux-command\/","title":{"rendered":"Uniq Linux Command: Handling Duplicate Lines in Files"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2023\/12\/Graphic-depiction-of-a-Linux-terminal-using-the-uniq-command-for-filtering-or-reporting-repeated-lines-in-a-file-300x300.jpg\" alt=\"Graphic depiction of a Linux terminal using the uniq command for filtering or reporting repeated lines in a file\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>Do you find yourself grappling with duplicate lines in your Linux files? You&#8217;re not alone. Many users find it challenging to handle duplicate lines in Linux, but the &#8216;uniq&#8217; command tool can help. Think of the &#8216;uniq&#8217; command in Linux as a filter, a tool that effortlessly sifts out repeated lines in a text file, ensuring your files are neat and duplicate-free.<\/p>\n<p><strong>This guide will walk you through the ins and outs of the &#8216;uniq&#8217; command in Linux.<\/strong> From basic usage to advanced techniques, we&#8217;ll cover it all. We&#8217;ll even delve into common issues and their solutions, ensuring you&#8217;re well-equipped to handle any situation.<\/p>\n<p>So, let&#8217;s dive in and start mastering the &#8216;uniq&#8217; command in Linux!<\/p>\n<h2>TL;DR: How Do I Use the &#8216;uniq&#8217; Command in Linux?<\/h2>\n<blockquote><p>\n  The <code>'uniq'<\/code> command in Linux is a powerful tool used to remove duplicate lines from a sorted file. It can be used by piping the sort file command into &#8216;uniq&#8217; with the syntax, <code>sort sample_file.txt | uniq<\/code>. Or you can use it with arguments and the syntax, <code>uniq [option] sample_file.txt<\/code>.\n<\/p><\/blockquote>\n<p>Here&#8217;s a simple example:<\/p>\n<pre><code class=\"language-bash line-numbers\">sort file.txt | uniq\n<\/code><\/pre>\n<p>In this example, we first sort the contents of &#8216;file.txt&#8217; using the &#8216;sort&#8217; command. The sorted output is then piped into &#8216;uniq&#8217;, which removes any duplicate lines. The result is a clean, duplicate-free version of &#8216;file.txt&#8217;.<\/p>\n<blockquote><p>\n  But the &#8216;uniq&#8217; command in Linux has much more to offer. Continue reading for more detailed information, advanced usage scenarios, and tips to get the most out of &#8216;uniq&#8217;.\n<\/p><\/blockquote>\n<h2>Getting Started with the &#8216;uniq&#8217; Command<\/h2>\n<p>The &#8216;uniq&#8217; command is an incredibly handy tool for dealing with duplicate lines in a sorted file. It&#8217;s a filter that removes these duplicates, leaving you with a clean, streamlined file.<\/p>\n<p>Let&#8217;s dive into a step-by-step guide on how to use the &#8216;uniq&#8217; command.<\/p>\n<h3>Step 1: Create a Sorted File with Duplicate Lines<\/h3>\n<p>First, let&#8217;s create a simple text file with some duplicate lines. We&#8217;ll call this file &#8216;example.txt&#8217;. You can use any text editor to create this file. Here&#8217;s an example of what &#8216;example.txt&#8217; might look like:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"Hello\nHello\nWorld\nWorld\" &gt; example.txt\ncat example.txt\n\n# Output:\n# Hello\n# Hello\n# World\n# World\n<\/code><\/pre>\n<p>In this example, we&#8217;ve created a file with two duplicate lines: &#8216;Hello&#8217; and &#8216;World&#8217;.<\/p>\n<h3>Step 2: Using &#8216;uniq&#8217; to Remove Duplicate Lines<\/h3>\n<p>Now, let&#8217;s use the &#8216;uniq&#8217; command to remove these duplicate lines:<\/p>\n<pre><code class=\"language-bash line-numbers\">uniq example.txt\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<p>As you can see, the &#8216;uniq&#8217; command has removed the duplicate lines from &#8216;example.txt&#8217;, leaving us with a clean, duplicate-free file.<\/p>\n<p>The &#8216;uniq&#8217; command is a powerful tool, but it&#8217;s not without its potential pitfalls. One key thing to remember is that &#8216;uniq&#8217; only removes <em>consecutive<\/em> duplicate lines. This means that the file needs to be sorted before using &#8216;uniq&#8217;. If the file is not sorted, &#8216;uniq&#8217; may not work as expected.<\/p>\n<p>In the next section, we&#8217;ll explore more advanced uses of the &#8216;uniq&#8217; command, including how to use different flags or options for more complex scenarios.<\/p>\n<h2>Advanced Usage of the &#8216;uniq&#8217; Command<\/h2>\n<p>As you become more comfortable with the basic &#8216;uniq&#8217; command, you&#8217;ll find that it&#8217;s capable of much more than just removing duplicate lines. It&#8217;s a versatile tool that can be tailored to meet a variety of needs, thanks to its different flags or options.<\/p>\n<p>Before we dive into these advanced uses, let&#8217;s familiarize ourselves with some of the command-line arguments or flags that can modify the behavior of the &#8216;uniq&#8217; command. Here&#8217;s a table with some of the most commonly used &#8216;uniq&#8217; arguments.<\/p>\n<table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Description<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-d<\/code><\/td>\n<td>Displays only duplicate lines.<\/td>\n<td><code>uniq -d file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-u<\/code><\/td>\n<td>Displays only unique lines.<\/td>\n<td><code>uniq -u file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-c<\/code><\/td>\n<td>Prefixes lines by the number of occurrences.<\/td>\n<td><code>uniq -c file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-i<\/code><\/td>\n<td>Ignores case when comparing lines.<\/td>\n<td><code>uniq -i file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-f N<\/code><\/td>\n<td>Skips the first N fields on each line when comparing.<\/td>\n<td><code>uniq -f 1 file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-s N<\/code><\/td>\n<td>Skips the first N characters on each line when comparing.<\/td>\n<td><code>uniq -s 3 file.txt<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-w N<\/code><\/td>\n<td>Compares no more than N characters on each line.<\/td>\n<td><code>uniq -w 10 file.txt<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Now, let&#8217;s dive into some of these flags in more detail.<\/p>\n<h3>Displaying Only Duplicate Lines<\/h3>\n<p>The <code>-d<\/code> flag allows you to display only duplicate lines. This can be useful when you&#8217;re interested in seeing which lines are repeated in your file.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">uniq -d example.txt\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<p>In this example, &#8216;uniq&#8217; displays only the lines that are repeated in &#8216;example.txt&#8217;.<\/p>\n<h3>Displaying Only Unique Lines<\/h3>\n<p>The <code>-u<\/code> flag allows you to display only unique lines. This is handy when you want to see which lines appear only once in your file.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">uniq -u example.txt\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<p>In this example, &#8216;uniq&#8217; displays only the lines that appear once in &#8216;example.txt&#8217;.<\/p>\n<h3>Prefixing Lines by the Number of Occurrences<\/h3>\n<p>The <code>-c<\/code> flag allows you to prefix lines by the number of occurrences. This is useful when you want to see how many times each line appears in your file.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">uniq -c example.txt\n\n# Output:\n# 2 Hello\n# 2 World\n<\/code><\/pre>\n<p>In this example, &#8216;uniq&#8217; prefixes each line in &#8216;example.txt&#8217; by the number of times it appears in the file.<\/p>\n<p>These are just a few of the many ways you can use the &#8216;uniq&#8217; command in Linux. By understanding and utilizing these flags, you can tailor &#8216;uniq&#8217; to meet your specific needs.<\/p>\n<h2>Exploring Alternatives to the &#8216;uniq&#8217; Command<\/h2>\n<p>The &#8216;uniq&#8217; command is a powerful tool, but it&#8217;s not the only way to eliminate duplicate lines in a file. In some scenarios, other commands or scripts might be more suitable. Let&#8217;s explore some of these alternatives and how they compare to &#8216;uniq&#8217;.<\/p>\n<h3>Using &#8216;sort -u&#8217;<\/h3>\n<p>The &#8216;sort&#8217; command in Linux can also be used to remove duplicate lines when used with the &#8216;-u&#8217; option. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"Hello\nHello\nWorld\nWorld\" | sort -u\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<p>In this example, &#8216;sort -u&#8217; removes duplicate lines from the input. It&#8217;s a handy alternative to &#8216;uniq&#8217;, especially when dealing with unsorted data. However, it may not be as efficient as &#8216;uniq&#8217; for large, sorted files.<\/p>\n<h3>Using &#8216;awk&#8217;<\/h3>\n<p>The &#8216;awk&#8217; command is another powerful tool for handling text data. It can be used to remove duplicate lines in a more flexible way. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"Hello\nHello\nWorld\nWorld\" | awk '!a[$0]++'\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<p>In this example, &#8216;awk&#8217; removes duplicate lines from the input. It&#8217;s a more flexible alternative to &#8216;uniq&#8217;, as it can handle complex patterns and operations. However, it can be more complex and harder to understand for beginners.<\/p>\n<h3>Using Scripts<\/h3>\n<p>For more complex scenarios, you might consider using a script. Both &#8216;perl&#8217; and &#8216;python&#8217; offer powerful text handling capabilities. Here&#8217;s an example of a simple &#8216;python&#8217; script that removes duplicate lines:<\/p>\n<pre><code class=\"language-python line-numbers\">with open('file.txt', 'r') as f:\n    lines = f.readlines()\nlines = list(set(lines))\nwith open('file.txt', 'w') as f:\n    f.writelines(lines)\n<\/code><\/pre>\n<p>In this example, the script reads the lines from &#8216;file.txt&#8217;, removes duplicates using a set, and then writes the unique lines back to &#8216;file.txt&#8217;. This approach offers the most flexibility, but it can be overkill for simple tasks.<\/p>\n<p>In conclusion, while &#8216;uniq&#8217; is a powerful tool for removing duplicate lines, it&#8217;s not the only option. Depending on your needs and circumstances, &#8216;sort -u&#8217;, &#8216;awk&#8217;, or even a custom script might be a better fit.<\/p>\n<h2>Troubleshooting the &#8216;uniq&#8217; Command<\/h2>\n<p>While the &#8216;uniq&#8217; command is a powerful tool, it&#8217;s not without its quirks and potential pitfalls. In this section, we&#8217;ll tackle some common errors or obstacles you might encounter when using &#8216;uniq&#8217;, and provide solutions to overcome them.<\/p>\n<h3>Dealing with Unsorted Data<\/h3>\n<p>One of the most common issues arises from the fact that &#8216;uniq&#8217; only removes consecutive duplicate lines. This means that if your data isn&#8217;t sorted, &#8216;uniq&#8217; might not work as expected.<\/p>\n<p>For example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"World\nHello\nWorld\nHello\" | uniq\n\n# Output:\n# World\n# Hello\n# World\n# Hello\n<\/code><\/pre>\n<p>In this example, &#8216;uniq&#8217; doesn&#8217;t remove any duplicates because the duplicate lines aren&#8217;t consecutive. The solution is to sort your data before using &#8216;uniq&#8217;. You can do this with the &#8216;sort&#8217; command:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"World\nHello\nWorld\nHello\" | sort | uniq\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<h3>Ignoring Case<\/h3>\n<p>Another common issue arises when dealing with case sensitivity. By default, &#8216;uniq&#8217; is case sensitive, which means it treats &#8216;Hello&#8217; and &#8216;hello&#8217; as different lines.<\/p>\n<p>For example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"Hello\nhello\" | uniq\n\n# Output:\n# Hello\n# hello\n<\/code><\/pre>\n<p>In this example, &#8216;uniq&#8217; doesn&#8217;t remove the &#8216;hello&#8217; line because it&#8217;s case sensitive. If you want &#8216;uniq&#8217; to ignore case, you can use the &#8216;-i&#8217; flag:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"Hello\nhello\" | uniq -i\n\n# Output:\n# Hello\n<\/code><\/pre>\n<p>In this example, &#8216;uniq -i&#8217; removes the &#8216;hello&#8217; line because it ignores case.<\/p>\n<h3>Best Practices and Optimization<\/h3>\n<p>When using &#8216;uniq&#8217;, it&#8217;s important to keep a few best practices in mind. First, always remember to sort your data before using &#8216;uniq&#8217;. This ensures that all duplicate lines are consecutive and can be removed by &#8216;uniq&#8217;.<\/p>\n<p>Second, be mindful of case sensitivity. If you want &#8216;uniq&#8217; to ignore case, remember to use the &#8216;-i&#8217; flag. And finally, don&#8217;t forget about the various flags and options that &#8216;uniq&#8217; offers. These can be incredibly useful for tailoring &#8216;uniq&#8217; to your specific needs.<\/p>\n<h2>Understanding the &#8216;uniq&#8217; Command Fundamentals<\/h2>\n<p>The &#8216;uniq&#8217; command is one of many text processing commands available in Linux. To fully appreciate its functionality, it&#8217;s essential to grasp its place in the broader context of Linux commands and understand certain fundamental concepts.<\/p>\n<h3>Importance of Sorting Files<\/h3>\n<p>The &#8216;uniq&#8217; command operates on the principle of identifying and eliminating <em>consecutive<\/em> duplicate lines. This means the &#8216;uniq&#8217; command works best on sorted files where all instances of duplicate lines are grouped together.<\/p>\n<p>Consider this unsorted file:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e \"World\nHello\nWorld\nHello\" &gt; example.txt\ncat example.txt\n\n# Output:\n# World\n# Hello\n# World\n# Hello\n<\/code><\/pre>\n<p>If we run &#8216;uniq&#8217; on this file, no duplicates are removed because they are not consecutive:<\/p>\n<pre><code class=\"language-bash line-numbers\">uniq example.txt\n\n# Output:\n# World\n# Hello\n# World\n# Hello\n<\/code><\/pre>\n<p>However, if we first sort the file, &#8216;uniq&#8217; can effectively eliminate duplicates:<\/p>\n<pre><code class=\"language-bash line-numbers\">sort example.txt | uniq\n\n# Output:\n# Hello\n# World\n<\/code><\/pre>\n<h3>Standard Input and Output in Linux<\/h3>\n<p>The &#8216;uniq&#8217; command, like many Linux commands, operates on the concept of standard input (stdin) and standard output (stdout). By default, &#8216;uniq&#8217; reads from stdin and writes to stdout. This allows it to be used in conjunction with other commands through pipelines.<\/p>\n<p>In the examples we&#8217;ve seen, we&#8217;ve used &#8216;uniq&#8217; in a pipeline with &#8216;sort&#8217;. The &#8216;sort&#8217; command sorts the file and writes the sorted lines to stdout. These lines become the stdin for &#8216;uniq&#8217;, which then removes duplicates and writes the unique lines to stdout.<\/p>\n<p>Understanding these fundamentals allows you to use &#8216;uniq&#8217; more effectively and in conjunction with other Linux commands. In the next section, we&#8217;ll look at how the &#8216;uniq&#8217; command can be applied in larger scripts or projects.<\/p>\n<h2>Expanding the &#8216;uniq&#8217; Command to Larger Projects<\/h2>\n<p>The &#8216;uniq&#8217; command, while simple in its basic form, can be a powerful tool when integrated into larger scripts or projects. Its ability to remove duplicate lines from a sorted file can be leveraged in various ways to streamline data processing tasks.<\/p>\n<h3>Collaborating with Other Commands<\/h3>\n<p>In typical use cases, the &#8216;uniq&#8217; command often works in tandem with other commands. For instance, &#8216;sort&#8217; is a frequent partner of &#8216;uniq&#8217;, as sorting the input is a prerequisite for &#8216;uniq&#8217; to work effectively.<\/p>\n<p>Another commonly associated command is &#8216;grep&#8217;, which can be used to filter the input based on a pattern before passing it to &#8216;uniq&#8217;. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">grep 'error' log.txt | sort | uniq -c\n\n# Output:\n# 5 error: disk full\n# 3 error: file not found\n<\/code><\/pre>\n<p>In this example, we&#8217;re scanning a log file for lines containing the word &#8216;error&#8217;. These lines are then sorted and passed to &#8216;uniq&#8217;, which counts the occurrences of each unique error message.<\/p>\n<h3>&#8216;uniq&#8217; in Scripting<\/h3>\n<p>The &#8216;uniq&#8217; command can also be a part of a larger script. For instance, you might have a script that processes a log file, extracts certain lines, removes duplicates, and then performs some further processing on the unique lines.<\/p>\n<h3>Further Resources for Mastering &#8216;uniq&#8217;<\/h3>\n<p>To further your understanding of the &#8216;uniq&#8217; command and its applications, consider exploring these resources:<\/p>\n<ul>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/uniq-invocation.html\" target=\"_blank\" rel=\"noopener\">GNU Coreutils: uniq invocation<\/a>: This is the official documentation for &#8216;uniq&#8217; from GNU. It offers a comprehensive overview of the command and its options.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.thegeekstuff.com\/2013\/05\/uniq-command-examples\/\" target=\"_blank\" rel=\"noopener\">The Geek Stuff: 10 &#8216;Uniq&#8217; Command Examples<\/a>: This article provides several practical examples of using &#8216;uniq&#8217; in different scenarios.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.redhat.com\/sysadmin\/uniq-command-lists\" target=\"_blank\" rel=\"noopener\">How to Use Uniq Command in Linux<\/a>: This guide by Red Hat offers a detailed walkthrough of the &#8216;uniq&#8217; command, complete with examples and explanations.<\/p>\n<\/li>\n<\/ul>\n<p>By understanding the fundamentals of &#8216;uniq&#8217; and exploring its advanced uses, you can make this command a versatile tool in your Linux arsenal.<\/p>\n<h2>Wrapping Up: Filtering Duplicates with &#8216;uniq&#8217;<\/h2>\n<p>In this comprehensive guide, we&#8217;ve delved into the &#8216;uniq&#8217; command in Linux, a versatile tool for filtering duplicate lines in text files. From basic usage to advanced techniques, we&#8217;ve explored the different facets of &#8216;uniq&#8217;, providing practical examples and tips along the way.<\/p>\n<p>We began with the basics, understanding how to use the &#8216;uniq&#8217; command to remove duplicate lines from a sorted file. We then delved into more advanced usage, exploring the different flags or options that can modify the behavior of &#8216;uniq&#8217;. Along the way, we tackled common issues that you might encounter when using &#8216;uniq&#8217; and provided solutions to overcome these challenges.<\/p>\n<p>We also looked at alternative approaches to removing duplicate lines, such as using &#8216;sort -u&#8217;, &#8216;awk&#8217;, or even a custom script. Here&#8217;s a quick comparison of these methods:<\/p>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Pros<\/th>\n<th>Cons<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>uniq<\/td>\n<td>Simple, efficient for sorted data<\/td>\n<td>Only removes consecutive duplicates<\/td>\n<\/tr>\n<tr>\n<td>sort -u<\/td>\n<td>Handles unsorted data<\/td>\n<td>Less efficient for large, sorted files<\/td>\n<\/tr>\n<tr>\n<td>awk<\/td>\n<td>More flexible, handles complex patterns<\/td>\n<td>More complex, harder to understand for beginners<\/td>\n<\/tr>\n<tr>\n<td>Script (e.g., python)<\/td>\n<td>Most flexible, can handle complex scenarios<\/td>\n<td>Overkill for simple tasks, requires additional knowledge<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Whether you&#8217;re just starting out with the &#8216;uniq&#8217; command or you&#8217;re looking to deepen your understanding, we hope this guide has been a useful resource. The &#8216;uniq&#8217; command is a powerful tool in your Linux arsenal, and with this knowledge, you&#8217;re well-equipped to make the most of it. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you find yourself grappling with duplicate lines in your Linux files? You&#8217;re not alone. Many users find it challenging to handle duplicate lines in Linux, but the &#8216;uniq&#8217; command tool can help. Think of the &#8216;uniq&#8217; command in Linux as a filter, a tool that effortlessly sifts out repeated lines in a text file, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14436,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,3,9],"tags":[],"class_list":["post-6518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","category-linux","category-sysadmin","cat-124-id","cat-3-id","cat-9-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=6518"}],"version-history":[{"count":6,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6518\/revisions"}],"predecessor-version":[{"id":14404,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6518\/revisions\/14404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/14436"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=6518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=6518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=6518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}