1.What will be matched by the following regular expressions? 1. x* 2. [0-9]\{3\} 3. xx* 4. [0-9]\{3,5\} 5. x\{5,\} 6. ^\... 7. x\{10\} 8. 9. [0-9]* [A-Za-z_][A-Za-z_0-9]* 0. ^Begin$ 1. [0-9][0-9][0-9] 2. ^..*\1$

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 3GZ
icon
Related questions
Question
Chapter 3 Exercises
Make sure you attach screen shots or proof that you ran the answers in Putty
for questions 4, 5 6, 7.
1.What will be matched by the following regular expressions?
1. x*
2. [0-9]\{3\}
3. xx*
4. [0-9]{3,5\]}
5. x\{5,\}
6. ^\...
7. x\{10\}
8.
9. [0-9]*
.O. ^Begin$
1. [0-9][0-9][0-9]
2. ^..*\1$
[A-Za-z_][A-Za-z_0-9]*
2. What will be the effect of the following commands?
3. who | grep 'mary' or who | grep '245'
4. who | grep ^mary' or or who | grep '^245'
5. grep '[Uu]nix' ch?/*
6. Is-1 | sort -n-k 5
7. sed '/^$/d' text > text.out
8. sed 's/[Uu]nix/\1(TM)/g' text > text.out
9. date | cut-c12-16
Transcribed Image Text:Chapter 3 Exercises Make sure you attach screen shots or proof that you ran the answers in Putty for questions 4, 5 6, 7. 1.What will be matched by the following regular expressions? 1. x* 2. [0-9]\{3\} 3. xx* 4. [0-9]{3,5\]} 5. x\{5,\} 6. ^\... 7. x\{10\} 8. 9. [0-9]* .O. ^Begin$ 1. [0-9][0-9][0-9] 2. ^..*\1$ [A-Za-z_][A-Za-z_0-9]* 2. What will be the effect of the following commands? 3. who | grep 'mary' or who | grep '245' 4. who | grep ^mary' or or who | grep '^245' 5. grep '[Uu]nix' ch?/* 6. Is-1 | sort -n-k 5 7. sed '/^$/d' text > text.out 8. sed 's/[Uu]nix/\1(TM)/g' text > text.out 9. date | cut-c12-16
4. who | grep ^mary or or who | grep 245
5. grep '[Uu]nix' ch?/*
6. Is -l | sort -n -k 5
7. sed '/^$/d' text > text.out
8. sed 's/[Uu]nix/\1(TM)/g' text > text.out
9. date | cut -c12-16
3. Write the command to find all logged-in users with usernames of at least
four characters.
4. Find all users on your system whose user IDs are greater than 99, and the
number of users on
your system whose user IDs are greater than 99.
Hint: /etc/passwd has all users with their ids.
5. List all the files in your directory in decreasing order of file size.
6.Explain what below command will do?
find /tmp -name 'conf* -type f 2>/dev/null
< Previous
Next ►
Transcribed Image Text:4. who | grep ^mary or or who | grep 245 5. grep '[Uu]nix' ch?/* 6. Is -l | sort -n -k 5 7. sed '/^$/d' text > text.out 8. sed 's/[Uu]nix/\1(TM)/g' text > text.out 9. date | cut -c12-16 3. Write the command to find all logged-in users with usernames of at least four characters. 4. Find all users on your system whose user IDs are greater than 99, and the number of users on your system whose user IDs are greater than 99. Hint: /etc/passwd has all users with their ids. 5. List all the files in your directory in decreasing order of file size. 6.Explain what below command will do? find /tmp -name 'conf* -type f 2>/dev/null < Previous Next ►
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage