Answer the following questions about regular expression, give an example if necessary. • what is the difference between ab.cd and ab*cd? • what is the difference between ab.*cd and abb*cd ? • what is the difference between ^abc and ^abc$? • what is the difference between [abc]d and [^abc]d? • What is the difference between [A-Z][_a-zA-Z0-9]* and [A-Z_][a-zA-Z0-9]*? (Note the regular expression “x*$” could be described as a line has “zero or more x at the end of the line”.) c University of Southern Queensland 12 CSC2408—Software Development Tools Question 3. (10 marks) • Give the command-line of using find to list all the files having specific username in the current directory • Give the command-line of using find to list all the subdirectories in the current directory • Use find to produce a long ls listing of all files in /usr/bin that are more than 750Kb long. Give all the arguments and options in the following command-line find ..... -exec ls -l {} \; Note that pay special attention to the arguments or options. The semicolon must be escaped, but not the {}. Question 4. (10 marks) Create a big file (If you don’t know how to create a big file, try ls -l /usr/bin > bigfile). Create two copies of it using cp, and call them big1 and big2. • Give the command-line of compressing big1 using gzip (should produce big1.gz). • Compress big2 using bzip2(should produce big2.bz2). • Give the command-line of comparing the sizes of the compressed files (big1.gz and big2.bz2) and the original (bigfile) using ls -l • Give the command-line of checking the file type of compressed files and the original. • Give the command-line of displaying the contents of big1.gz using zcat and big2.bz2 but using bzcat without uncompress them. (You may pipe the output to head -10 to avoid lots of output). Question 5. (10 marks) • Use tar to create an archive (don’t use the z or j option) of all the files in the current directory. • Compress the tar file with gzip. c University of Southern Queensland CSC2408—Software Development Tools13 • View the contents of archive with gunzip -c gzipped-tar-file | tar tfv - • View without using gunzip but use the tar instead. (Hint: find the right option to use from the man page). • Create a subdirectory of the current directory. • Use tar to unpack the archive into that directory at the current directory. Question 6. (10 marks) Assume you have a text file called file. Explain the following commandlines. 1. sed "s/the/a/g" file 2. sed -n "s/[A-Z]/&/gp" file 3. sed "32,45 s/[()]//g" file 4. sed "/^$/d" file 5. sed "s/\([0-9]\)-\([0-9]\)/\1\2/g" file 6. sed "80q" file For example, sed ’s/fox/ox/g’ file will replace all occurance of fox with ox and not the just the first one in file
I was so busy thosedays. However, your solution was beautiful and i would use this website again thanks for u.
Over the last few years, MyAssignmenthelp.com has emerged as one of the leading websites that provide high quality accounting assignment help. We provide assistance with wide ranges of assignments. We have segmented our writers in separate teams to offer maths assignment; economic assignment help and statistics assignment help as well. We have teams of expert writers to render assistance on more than 100 subjects. We offer custom-made law assignment help to students who are looking for assignment help with legal terms and structure.
Just share requirement and get customized Solution.
Orders
Overall Rating
Experts
Our writers make sure that all orders are submitted, prior to the deadline.
Using reliable plagiarism detection software, Turnitin.com.We only provide customized 100 percent original papers.
Feel free to contact our assignment writing services any time via phone, email or live chat. If you are unable to calculate word count online, ask our customer executives.
Our writers can provide you professional writing assistance on any subject at any level.
Our best price guarantee ensures that the features we offer cannot be matched by any of the competitors.
Get all your documents checked for plagiarism or duplicacy with us.
Get different kinds of essays typed in minutes with clicks.
Calculate your semester grades and cumulative GPa with our GPA Calculator.
Balance any chemical equation in minutes just by entering the formula.
Calculate the number of words and number of pages of all your academic documents.
Our Mission Client Satisfaction
i was very satisfied with the responses provided to me for my assignment. It helped me to achieve high marks on my assignment. Thank you experts
Australia
Thanks. I love the fast solutions. I am sure that I will receive an excellent grade, as I usually do
Australia
Thanks for the fast solution. This is a reliable source that is sure to get you a good grade
Australia
Amazing! delivered on time was very patient and thank you so much for your efforts. I really appreciate :)
Australia