The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need a regular expression tony3101 Shell Programming and Scripting 4 4 Weeks Ago 12:13 AM
Regular Expression Problem chris1234 UNIX for Dummies Questions & Answers 12 04-02-2008 04:44 AM
Regular Expression problem djkane Shell Programming and Scripting 5 06-21-2006 07:07 AM
Regular Expression Problem netmaster UNIX for Dummies Questions & Answers 1 12-07-2005 05:34 PM
Regular Expression + Aritmetical Expression Z0mby Shell Programming and Scripting 2 05-21-2002 07:59 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-2005
Registered User
 

Join Date: Nov 2005
Posts: 6
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Complex Pipeline/Redirection/Regular Expression problem

This is a very hard unix command which I could not perform..... ......here it is:


The file ~unx122/public/data.txt contains over 18,000 lines of text. Here are the first ten lines of the file:

pagination 20657 2740 28416 31090 18145

shiner 1695 2507 9964 14512 13122

cool 29210 23832 22861 25037 18722

entertain 16186 23873 5049 3781 15735

sandwiches 9407 61 10817 7342 18224

sustenance 27174 8344 331 18238 25000

humanitarian 29733 13594 5573 24760 20213

Gus 10371 20643 22256 28933 7187

promoting 24678 31046 5759 7005 29626

ethereal 4963 15542 12202 23911 31595


Each line contains a word and five numbers, each separated by spaces. There are no spaces or punctuation marks in any of the words; each word consists of only upper- and lower-case letters. All of the numbers are whole numbers (no decimals and no negative numbers). There are no leading zeros (extra zeros added to the start of the numbers).

*****************************************************

From the file ~unx122/public/data.txt, select all of the lines that
have a word in column one that starts and ends with vowels
and have values between 1000 and 9999 in the third column.

Sort these lines in reverse order according to column 3, then
select lines 15 through 37. Finally, put these lines in
normal order according to column 1 and write them to the file
~/uli101_a2_output.txt (overwrite any data already in that file).

Create a command pipeline to perform this task. In the file ~/uli101_assignment2, place an appropriate bash shebang line, then your command pipeline.


Definitions

Here are the definitions of some of the terms used in the problem description:

Vowel - one of the letters: a, e, i, o, or u.

Consonant - any letter that is not a vowel.

Character - any letter,number, digit, space, or punctuation character.

Upper-Case - CAPITAL LETTERS

Lower-Case - non-capital letters

Odd digit - one of these digits: 1, 3, 5, 7, or 9.

Even digit - one of these digits: 0, 2, 4, 6, or 8.

Odd number - A number which is not evenly divisible by 2 (a number
ending in an odd digit).

Even number - A number which is evenly divisible by 2 (a number
ending in an even digit).

Normal order - Ascending order (lowest to highest value).
Use a numeric sort for numbers, or an ASCII sort for text.

Reverse order - Descending order (highest to lowest value).
Use a numeric sort for numbers, or an ASCII sort for text.
Forum Sponsor
  #2 (permalink)  
Old 11-28-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 2,960
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
had you completed ~/uli101_assignment1, it would have made it easier complete this assignment as well.

Pls read the rules of this forum and refrain from posting the homework assignments in the future.
Thread closed.
Google UNIX.COM
Closed Thread



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102