Kush
High On Life!
- Joined
- 13 Jan 2002
- Messages
- 4,590
So i got some help and did the command, but its not doing it correctly according to the submission script i get 0 lines correct and 0 in the right order.
From the file ~unx122/public/data.txt, select all of the lines that
have a word in column one which starts with a vowel and ends with a consonant
and have two even digits in the last column..
Sort these lines in reverse order according to column 4, then
select lines 0 through 52. Finally, put these lines in
normal order according to column 3 and write them to the file
~/uli101_a2_output.txt (overwrite any data already in that file).
grep '^[aeiouAEIOU][a-zA-Z]*[^aeiouAEIOU] .*[02468]\{2\}$' ~unx122/public/data.txt | sort -r +3 | head -53 | sort +2 > uli101_a2_output.txt
From the file ~unx122/public/data.txt, select all of the lines that
have a word in column one which starts with a vowel and ends with a consonant
and have two even digits in the last column..
Sort these lines in reverse order according to column 4, then
select lines 0 through 52. Finally, put these lines in
normal order according to column 3 and write them to the file
~/uli101_a2_output.txt (overwrite any data already in that file).
grep '^[aeiouAEIOU][a-zA-Z]*[^aeiouAEIOU] .*[02468]\{2\}$' ~unx122/public/data.txt | sort -r +3 | head -53 | sort +2 > uli101_a2_output.txt