Sponsored Content
Full Discussion: Question for school quiz
Top Forums UNIX for Dummies Questions & Answers Question for school quiz Post 50789 by djeung on Sunday 2nd of May 2004 07:42:56 PM
Old 05-02-2004
Question for school quiz

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. Programming

C Programming Quiz

Hey check this out..it's only a 10 question quiz..but it's brain storming. http://mulogic.phpnet.us/drupal I scored 7/10 (3 Replies)
Discussion started by: luv2beuniq
3 Replies

2. Shell Programming and Scripting

AWK quiz

How come every post in this forum is a request for help? How about some fun? What does the following command do? nawk -F'+' ' {i=NF;for(;i;i--)if($i)w++} END{ for(k in w){c=w;x=xk",";if(c>m)m=c} for(;m;m--)if(m in x)print m,x } ' <(man nawk) (2 Replies)
Discussion started by: colemar
2 Replies

3. AIX

HACMP pop quiz

Hi all, A pop quiz is being organized in my project and I've been appointed as one of the quiz-masters. This is a sample of what we are bringing forth. Feedback is welcome. 1)Name 2 commands used to display cluster state, but doesn't use the clinfoES daemon: a) ... (0 Replies)
Discussion started by: themetalingus
0 Replies

4. UNIX for Beginners Questions & Answers

Quiz help!

Hello, I'm new to Unix and need help answering these questions if possible, thanks. --------------------------------------------------------------------------------------- In a shell script, which command could be place at the end of a command line to combine stderr and stdout into the stdout... (1 Reply)
Discussion started by: julianpeters
1 Replies
look(1) 							   User Commands							   look(1)

NAME
look - find words in the system dictionary or lines in a sorted list SYNOPSIS
/usr/bin/look [-d] [-f] [-tc] string [filename] DESCRIPTION
The look command consults a sorted filename and prints all lines that begin with string. If no filename is specified, look uses /usr/share/lib/dict/words with collating sequence -df. look limits the length of a word to search for to 256 characters. OPTIONS
-d Dictionary order. Only letters, digits, TAB and SPACE characters are used in comparisons. -f Fold case. Upper case letters are not distinguished from lower case in comparisons. -tc Set termination character. All characters to the right of c in string are ignored. FILES
/usr/share/lib/dict/words spelling list ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ SEE ALSO
grep(1), sort(1), attributes(5) SunOS 5.11 29 Mar 1994 look(1)
All times are GMT -4. The time now is 05:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy