Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need some help with the first and the third page mostly, but if you can help with other pages as well, it would be appriciated.
Need some help with the first and the third page mostly, but if you can help with other pages as well, it would be appriciated.
Part I: Answer the following questions 1. Tell the differences between Unix and Linux. Then please list some operating systems (at least three) which belong to Unix but not Linux. 2. What is the pipe mechanism in UNIX? And show one command using pipe and explain how the pipe works in it? 3. In a Linux system, you can issue the command Is / to check the sub- directories under root. Please describe the meanings of directory /bin, /dev, /boot, /usr, /etc, /mnt, /sbin, /var separately. For example, you can say that /bin contains binary executable files. 4. What is the meaning of Multitask and Multi-user in a Unix system? 5. What does GNU stand for? What is the GNU project? Which organization funded the development of GNU project? 6. Please tell the differences between POXIS-Basic regular expression and Extended regular expression. Then please list six special characters used in POXIS-Basic regular expression. And please list ten special characters used in POXIS-Extended regular expression. 7. How to search a string using a basic regular expression in Vi editor? How about using extended regular expression in Vi editor? Part II: Regular Expressioin 1. Chose match(es) for each given basic/extended regular expression (maybe multiple correct matches) and describe the pattern of matched string for 1), 2), 7), 8), 10) e.g. 'abta' (for extended regex engine) a) ababa b) aba caba d)aabbaa e)aa Answer: b,c; Pattern : The matched string should begin and end with 'a' and 'b'occurs at least once between leading and ending 'a) 1) alabl a (a)ababa (b) aaba (c) aabab (d) aabbaa (e)aa 2) 'a(bc)?' (a) abc (b) a(bc)? (c) a(bc (d) a e) abcbo 3) '.[ind]*" (a) wind () window (c) end d) good (e)will 4) Ta-z]+[a-z]' (a) a+b+c(b) +b(c) x (d)x+1(e) xta (a) a+b+c(b) +b(c) x (d)x+1(e) xta 6) a.[bc]+' (a)azbc (b) az(c) azbcbc (d) acc (eacz (a)azz (b) a0z(c) a01 (d) a0a (e)aza (a)good! (b) Book. (c) hard? (d) cool?hot (e)nothing 9) Ta-2]+[\.?!] \s* [A-Z), Chint: \s matches any whitespace characters) (a)Grade. A (b) book. Z (c) E. G(d) Level. a (index?a 10) '(very )+(cool )?(good]bad) weather' (a)good weather (b) very good weather (c) cool weather (d) very cool bad weather (e)cool good weather (a)3312 (b) -2231 (c)+32(d) 0.5 (e)2/3 12) -?[0-9] 10-9]* (a)3312 (b) -2231 (c) +32 (d) 0.5 (e)2/3 2. Write down the extended regular expression for following questions E.g. Social security number in the format of 999-99-9999 Answer: [0-9](3)-[0-9](2)-[0-9]1(4) 1) Valid URL beginning with "http://" and ending with ".edu" (e.g gs su.edu, http ://gsu.edu 2) Non-negative integers. (e.g. 0, +1,3320) 3) A valid absolute pathname in Unix (e.g. /home/ylong4, /test/try.c) 4) Identifiers which can be between 1 and 10 character long, must starting with a letter or an underscore. The following characters can be letters or underscores or digits. (e.g. number,_name1, isOK 5) Phone number in any of the following format: 9999999999,999-999- 9999, (999)-999-9999. (Note: all of these formats should be matched by a single regular expression)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