Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART 3: Explore grep filter commands in Chapter 10: grep root passwd.bak grep - e root -e amorris passwd.bak ps -ef | grep your username

PART 3: Explore grep filter commands in Chapter 10:

  • grep "root" passwd.bak
  • grep - e "root" -e "amorris" passwd.bak
  • ps -ef | grep "your username" NOTE: replace "your username" with your actual username on the general
  • grep "nobody" passwd.bak5
  • grep "^nobody" passwd.bak5
  • grep "[n*]obody" passwd.bak5
  • grep "bash$" passwd.bak5
  • TO HAND IN: Take a screen shot of these commands plus their execution for PART 3.

PART 4:

Explore sed filter commands

  • sed '5q' passwd.bak5
  • sed - n '1,5p' passwd.bak5
  • sed -n '5,8p' passwd.bak5
  • sed -n -e '5,8p' -e '20,24p' passwd.bak5
  • sed -n '$p' passwd.bak5
  • sed -e '/:x:0/w passwd.root.bak' passwd.bak5
  • vi myscript.sh NOTE: Develop your own short script
  • sed '1i\#just a comment\' myscript.sh > myscript2.sh
  • sed 's/:/|/g' passwd.bak5 | head
  • ls -al | sed '/^.....w/p'

charles harris 98310200987

bill Johnson 327-100-2345

robert dylan 9632454090

john woodcock 2344987665

barry wood 234-908-3456

gordon lightfoot 345-987-4670

  • sed 's /[][az] *[][az]/\2, \1/' teledir.txt | sort
  • TO HAND IN: Take a screen shot of these commands plus their execution for PART 4.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Give an example of a high-level programming language.

Answered: 1 week ago