Tag: sed

  • sed : remove lines between two keywords [ including keywords ]

    sed : remove lines between two keywords [ including keywords ]

    The post explains a useful sed command trick to remove all lines between two keywords. The lines which has these keywords will also be removed. The below given command will show you the output on terminal and do not make any changes inside the file. So it is safe to use as preview output. sed […]

  • 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 […]

  • Taking file backup while using sed command with -i flag

    Taking file backup while using sed command with -i flag

    Today this is another post on sed command in our blog. sed which is one of the famous and dynamic stream line editor use in Unix/Linux Operating System . Along with sed command we can use many available option. One of the option is -i . As per the manual page of sed command (Run […]

  • 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 […]

  • remove html tags by using sed command

    remove html tags by using sed command

    In this post we are sharing tips to remove html tags by using sed command. Today, while working on migration of site from wordpress to static site, I used lots of sed command. I am sharing some sed command which are always successful for me. In html tags generally the tags are coded in this […]

  • 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 […]