Introduction So you got a text file with duplicates (words, lines, etc) and you want to delete the extra ones ? How can we do that ? This post discusses a couple of methods that can be used to remove duplicates via Unix (or Mac) terminal. Assume we have the following text file… Let us
What is PIP PIP (stands for PIP Installs Packages) is a command line utility to manage (ex. install, uninstall, etc) Python packages. Depending on which Python version, you may or may not have it installed. Newer versions of Python already ship with PIP. If you do not have it installed, follow the steps below… Check
Introduction Removing empty lines in a text file from the Unix shell is quite easy. There are a couple of ways to do that. Let us explore a few… Remove empty lines using sed command The stream editor (sed) can be used to filter and transform text. Removing empty lines using sed can be done
Introduction To check service port numbers on a Unix based operating system, you may use one of the following methods… netstat command netstat command is used to display network related data. It is available on most Unix flavors including MacOS. The syntax may vary so it is recommended to check the manual (ex. man netstat
Introduction Assume we have a directory structure (ex. product source code) and we want to share it with someone. To do that on Unix, we can tar the directory structure (convert to a single file archive) then compress the file. If we do not pay due attention, original file and directory paths can be retained
Introduction On Unix based operating systems (Linux, MacOS, etc) a common task is to search for files. For example, we may need to search for text files only. In this post, we will demonstrate the command line syntax to filter out binary and executable files and only keep text files. Follow the steps below… Create
Introduction Working from the command line or the terminal can not be avoided if we want to streamline tasks or if we want to implement any sort of automation. In automation, we may need to open a browser to a specific URL or retrieve data from an end point. Opening a browser from the terminal
Introduction Modern operating systems support multitasking via CPU time sharing. The operating system manages CPU time by implementing a scheduling algorithm. In this article, we are going to briefly discuss round robin scheduling algorithm. To better understand the topic, you may check the following posts… Multitasking terms Scheduling algorithms Evaluate a scheduling algorithm Let us
Introduction Welcome to a new operating systems post. Today, we are going to clarify the difference between swapping and paging. The goal is to focus on the main difference between the two and see why is it sometimes confusing. Let us give it a try… Modern operating systems support multitasking and virtual memory. I recommend
Introduction If you search for the phrase “Process vs Thread” I bet you, most of the articles you may find follow a typical structure. You will probably find a list of points in a tabular or bullet format contrasting process vs thread. Some articles are excellent but many lack a proper context. In this post,