Question

unix command: If you type the command: apropos keyboard, you'll get both commands and functions. Commands...

unix command:

If you type the command: apropos keyboard, you'll get both commands and functions. Commands will contain the string (1). Write a command that will output only the command results for apropos keyboard?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

command for above mentioned function is :

apropos email | sed 's/|/ /' | awk '{print $1, $2}'

for filtering the results of the apropos command, i am pipelining the apropos with sed command and then pipeling whole with awk command to split the results according to the columns and then i am displaying the first and second columns according to the need.

you can display only first column also just remove '$2' from the command.

if my answer helped please upvote and feel free to ask anything in comments

thankyou !

Add a comment
Know the answer?
Add Answer to:
unix command: If you type the command: apropos keyboard, you'll get both commands and functions. Commands...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Explain what the following UNIX command does: Is 'echo I.txt' Please type shell commands (for Windows....

    Explain what the following UNIX command does: Is 'echo I.txt' Please type shell commands (for Windows. UNIX, or any other system that you like) for: creating a directory called hello world list the contents of this directory create a file called iwashere.txt display the contents of the file iwashere.txt from the command-line Please write a simple program in C for accepting a string from the command-line, reversing and printing the reversed string to standard output.

  • 1) Write a Unix command that will display the message below using echo and the value...

    1) Write a Unix command that will display the message below using echo and the value of your environment variable instead of the sample student login /students/astud01 My home directory is /students/astude01 2) Write a Unix command to display your login and the system date with both commands on one line (the output may be on separate lines) SAMPLE OUTPUT (details will differ): cconner Tue Jul 7 15:38:44 PDT 2015 3) 1.Write a Unix command that will redirect (>) the...

  • 1) Write a single line UNIX command to list all sh files matching the multiple conditions...

    1) Write a single line UNIX command to list all sh files matching the multiple conditions below: • at directory "/home/test" • filename containing "exam" 2) Write a single line UNIX command to check if "/home/exam2" in the PATH variable. 3) How to obtain the value of command line arguments in a shell program? 4) Write a single line UNIX command to run an executable Java program Hello at background and output the number of lines in the result. 5)...

  • Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell...

    Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...

  • When you run a UNIX command where does the shell get the list of directories to...

    When you run a UNIX command where does the shell get the list of directories to search for the command that you entered? A. From the user B. From the command C. From the PATH variable D. From the kernel

  • Task 10: Creating functions In Windows PowerShell, you can declare functions. Functions are reusable pieces of...

    Task 10: Creating functions In Windows PowerShell, you can declare functions. Functions are reusable pieces of code that can be called as many times as you want after you declare them. In this step, you will declare a function, learn about using different types of parameters, and specify default values for these parameters. 1. In the Windows PowerShell ISE, press CTRL+N. 2. In the script pane, type the following code. function Get-Soup ( [switch] $please, [string] $soup = "chicken noodle"...

  • In Linux Please What is the command or commands that will show you the last 15...

    In Linux Please What is the command or commands that will show you the last 15 lines of the /var/log/kernel.log file? Please write the commands and copy the output.

  • QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A....

    QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A. List all files and directories recursively starting from / B. List a file names * in / C. List all files in / directory D. List all files and directories in / directory QUESTION 2 Which command is used to extract a column/field from a text file / input. A. paste B. get C. cut D. tar QUESTION 3 Which command creates an empty...

  • Using Unix processes Submit a README file that lists the files you have submitted along with...

    Using Unix processes Submit a README file that lists the files you have submitted along with a one sentence explanation. Call it Prj1README. MakeCopy.c : Write a C program that makes a new copy of an existing file using system calls for file manipulation. The names of the two files and copy block sizes are to be specified as command line arguments. Open the source file in read only mode and destination file in read/write mode. ForkCopy.c : Write a...

  • Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the...

    Linux / Unix: Please explain in details if you can. Thanks. Write find commands for the following. No need to submit execution output. 3. To find all files from current directory that have not been modified in the past three days 4. To find all files from /bin that are owned by root 5. To find all files from /etc that have the inode number 87539084

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT