Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started