Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Below is the output from my LPIC book I am stuck because I dont understand what the Addresses mean in this Table 1.4. Can anyone explain what they mean by 0 or 1?
"The sed command directly modifies the contents of files, sending the changed file to standard output. Its syntax can take one of two forms:
sed [options] -f script-file [input-file]
sed [options] script-text [input-file]
In either case, input-file is the name of the file you want to modify. (Modifications are temporary unless you save them in some way, as illustrated shortly.) The script (script-text or the contents of script-file) is the set of commands you want sed to perform. When you pass a script directly on the command line, the script-text is typically enclosed in single quote marks. Table 1.4 summarizes a few sed commands that you can use in its scripts.
TABLE 1.4 Common sed commands
Command Addresses Meaning
= * 0 or 1 Display the current line number.
a\text * 0 or 1 Append text to the file.
i\text * 0 or 1 Insert text into the file.
r filename * 0 or 1 Append text from filename into the file.
c\text * Range Replace the selected range of lines with the provided text.
s/regexp/repl * Range Replace text that matches the regular expression (regexp) with replacement.
w filename * Range Write the current pattern space to the specified file.
q * 0 or 1 Immediately quit the script, but print the current pattern space.
Q * 0 or 1 Immediately quit the script.