Sponsored Content
Top Forums Shell Programming and Scripting please help (closed homework thread) Post 50790 by djeung on Sunday 2nd of May 2004 07:44:01 PM
Old 05-02-2004
please help

I have these questions for my unix class that I can't figure out because I missed a couple of days. They are for a quiz we took last week so by answering the questions you are not bettering my grade or doing my homework. I just want to understand was the answers. My teacher is really bad at explaining things.


1. Matcha line containing the assignment of a value to a legal shell variable in grep.

2. Match a word containing a repeating sequence of characters, with one or more characters in between, in grep, e.g., match "abcxyabc" or "xax", but not "abcd" or "aa".

3. Exchange the second and third words on a line with at least 4 words in sed, leaving the rest unchanged, e.g., "hi there joe kool" becomes "hi joe there kool", but "hi there joe" is unchanged.

4. Match lines containing one or more letters immediately followed by one or more digits in grep, e.g., match "abc123" or "a7" but not "az-12".

5. Match lines containing a repeating sequence of letters followed at any distance by one or more digits in grep, e.g., match "axax123" or "aaxyz7" but not "az12" in grep.
 

4 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

my thread got closed

I had a thread open and now it says it's closed. I had a question still on the forum and about 15mins after I posted my most recent question on it the thread said "closed". Why did this happen? I didn't violate any forum rules. Is there a limit on how many postings you can have in a single thread?... (1 Reply)
Discussion started by: hpicracing
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Thread closed when learner has tried

I'm not so sure that this thread should have been closed. Though it was clearly homework the student was asking a specific question related to the assignment, but not the answer to the whole assignment. /www.unix.com/unix-dummies-questions-answers/107494-how-get-rid.html . IMHO The solution is... (1 Reply)
Discussion started by: methyl
1 Replies

3. UNIX for Dummies Questions & Answers

3 homework questions (thread closed)

1st) how can i print only directories? 2nd) how can i print files that someone used in the last X days (for example, 5). thanks very much, i need it for homework and teacher teachs us nothing:( (1 Reply)
Discussion started by: SupErioR
1 Replies

4. Solaris

Interview questions [thread closed]

Hi all, i have found a set questions from the net, i thought it will be great to ask and share with you gurus. I have the questions and some answers (correct me, if i am wrong) for these set of questions. 1. What file do you modify to change the mail aliases (Provide the full path) ? Ans:... (1 Reply)
Discussion started by: kingston
1 Replies
QUIZ(6) 							 BSD Games Manual							   QUIZ(6)

NAME
quiz -- random knowledge tests SYNOPSIS
quiz [-t] [-i file] [question answer] DESCRIPTION
The quiz utility tests your knowledge of random facts. It has a database of subjects from which you can choose. With no arguments, quiz displays the list of available subjects. The options are as follows: -t Use tutorial mode, in which questions are repeated later if you didn't get them right the first time, and new questions are presented less frequently to help you learn the older ones. -i Specify an alternative index file. Subjects are divided into categories. You can pick any two categories from the same subject. quiz will ask questions from the first cate- gory and it expects answers from the second category. For example, the command ``quiz victim killer'' asks questions which are the names of victims, and expects you to answer with the cause of their untimely demise, whereas the command ``quiz killer victim'' works the other way around. If you get the answer wrong, quiz lets you try again. To see the right answer, enter a blank line. Index and Data File Syntax The index and data files have a similar syntax. Lines in them consist of several categories separated by colons. The categories are regular expressions formed using the following meta-characters: pat|pat alternative patterns {pat} optional pattern [pat] delimiters, as in pat[pat|pat]pat In an index file, each line represents a subject. The first category in each subject is the pathname of the data file for the subject. The remaining categories are regular expressions for the titles of each category in the subject. In data files, each line represents a question/answer set. Each category is the information for the question/answer for that category. The backslash character (``'') is used to quote syntactically significant characters, or at the end of a line to signify that a continuation line follows. If either a question or its answer is empty, quiz will refrain from asking it. FILES
/usr/share/games/bsdgames/quiz The default index and data files. BUGS
quiz is pretty cynical about certain subjects. BSD
May 31, 1993 BSD
All times are GMT -4. The time now is 03:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy