How to print particular line number by using sed command
|

How to print particular line number by using sed command

This is a single line sed command to illustrate the example of , ” How to print particular line number by using sed command ” . sed command are the ultimate stream line editor. Often we generally share sed related tips. Given below is content of file called test. Absolute path is /tmp/test This is…

sed command to display text between two strings or keywords
|

sed command to display text between two strings or keywords

In this post we will know about sed command to display text between two strings or keywords or words . Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream (a file or input from a pipeline) (Definition Reference from man page of sed). Knowledge of…

sed : find the pattern (keyword) and delete the line from file
|

sed : find the pattern (keyword) and delete the line from file

sed is stream line editor utility in unix operating systems.sed is a line-oriented text processing utility: it reads text, line by line, from an input stream or file, into an internal buffer called the pattern space. Each line read starts a cycle. To the pattern space, sed applies one or more operations which have been…

Replace keyword with its filename without extension : bash script

Replace keyword with its filename without extension : bash script

Today in this example we will use bash script. The task is replace keyword with its filename without extension.To accomplish this task we will use bash script.In bash script we will use for loop and sed command .To elaborate this example,lets assume we have 4 files called file1.txt red.txt blue.txt roger.txt The above each file…

convert space into new line using sed command

convert space into new line using sed command

convert space into new line using sed command In this sed command trick we will learn how to convert space into new line.For more understanding we will take an example. In file called test we have written colour names with spaces.Now we will convert the space into new line. Syntax: sed ‘s/s/n/g’ file_name example is…