Sed tutorial (i) Installation configuration

Source: Internet
Author: User

Describes how to set up an SED environment in a gnu/linux system

Install using the Package Manager

In general, SED is provided by default in most Gnu/linux distributions. Use this command to determine whether it exists on your system. If not, then in Debian-based gnu/linux you can use the APT Package Manager as follows to install SED:

[root]# sudo apt-get

After installation, ensure that SED can be accessed from the command line.

[Root]#--versio   

Executing the above code, you will get the following result:

sed (GNU sed) 4.2.2 Copyright (C) Free Software Foundation, Inc. License gplv3+: GNU GPL version 3 or later 

Similarly, the Gnu/linux-based RPM installation sed, with the Yum Package Manager, looks like this:

[Root]#-y install sed   

After installation, ensure that SED can be accessed from the command line.

[Root]#--version   

Executing the above code, you will get the following result:

GNU sed version 4.2.1 Copyright (C) by Free Software Foundation, Inc. This was free software; See the source for copying conditions.  There is NO warranty; Not even for merchantability or FITNESS for A particular PURPOSE, to the extent permitted by law.  GNU sed home page: 
Installing from source code

Since the GNU SED is part of the GNU program, its source code is free to download. We have seen how to install SED using the Package Manager. Now, learn how to install sed from source code.

The installation below applies to any Gnu/linux software, and most other free-to-use programs. Here are the installation steps:

1th Step-Download the source code from a real place. The command-line utility wget serves this purpose.

[root]# wget ftp://ftp.gnu.org/gnu/sed/sed-4.2.2.tar.bz2    

2nd Step-Unzip and decompress the source code of the download.

[root]# tar xvf sed-4.2.  2.tar.         

3rd Step-Change into directory and run configuration.

[root]#./    

4th Step-Once successfully completed, the configuration generates the makefile file. Compile the source code and use the Make command.

[root]#    make

5th Step-You can run a test suite to make sure that the build is clean. This is an optional step.

[root]#   

6th Step-Finally, install the SED utility. Make sure that you have superuser privileges.

[root]#   

We have successfully compiled and installed SED. By executing the SED command, verify the following:

[Root]#--version   

Executing the above code, you will get the following result:

sed (GNU sed) 4.2.2 Copyright (C) Free Software Foundation, Inc. License gplv3+: GNU GPL version 3 or later 

Sed tutorial (i) Installation configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.