This is a small post on how to delete a line from a file when it matched some criteria. We can use...Read More
In this post we will see how to delete repeated words. There is a human tendency to write fast and and when we try to review our writing we will find repeated words side by side. If you observe I written “and” two...Read More
This is our first post on AWK, in this we will see some of the basic stuff of AWK like history, advantages syntax and how it works etc.1. A brief history about AWK2. Advantages and disadvantages of AWK3. AWK syntax4. How AWK...Read More
Removing/renaming multiple files containing spaces is a bit difficult task. for, while loop, mv, cp commands can not understand spaces, we have to use for mentioning spaces some of the commands. For example if we...Read More
Q. I have a file which is of lower and upper case and want to convert it to upper case. How can I do that using a shell script? This can be achieved by using tr or sed command. Below are two examples on do that. #!/bin/bash...Read More
Q. I have a word abc and cde and I want to replace them both with xyz. How can I do that in Shell scripting? We can not do this without using sed command. Below are the ways you can do that. Below example will try to replace abc...Read More
Q. One of the blog follower asked this question. Write a LINUX shell script that accepts an arbitrarily long list of file names as arguments and replaces all digit’s in them with a “*”. This is bit tricky...Read More
Q. Delete or remove last line from a file. This can be achieved with SED command. sed -i '$d' filename Let me explain this command. SED is a stream editor which is useful for editing stream of characters. here -i...Read More
Q. I have a requirement to move all my shell script meta data such as interpreter, Author, date, purpose etc which occupies my first 5 lines. With head head -n5 *.sh > file.txt With SED sed -n ‘1,4 p’...Read More
This is our second post on SED, which is a Stream EDitor. Please find our Previous post on SED. You can find our other posts on RegExp basics and extended. Line number operator ( , and = switch) We can search in a file according...Read More
Learn SED with examples Before going to learn SED a brief intro is required. a)sed is a Stream EDitor. b)It reads line by line when a file is feed to it. c)sed will not edit the input file by default and it displays output on...Read More
Get more stuff like this
in your inbox
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Thank you for subscribing.
Something went wrong.
we respect your privacy and take protecting it seriously
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.