![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jul 2004
Posts: 4
Rep Power: 0
![]() |
can someone help me with these problems.
the file class.txt contains the computer login and student number of the students in a class. other information also appears on each lin of the file. items are separated from each other by spaces. of all the items on any line, only the student number is 8 digits and only the computer login is alphanumeric characters followed by two digits. it is guaranteed that the login appears before the number on any line. i need a shell command using sed that generates the file names.dat that contains lines with just student number and the login separated by one space. write a shell script that takes data from standard input, and reports the number of lines that begin with a #, and the number of words seen. a word is anything delimited by whitespace |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
Since this is another homework problem of yours... I need to see what you can come up with first, at least make an effort to solve the problem. You can type
'man sed' at the prompt for a good start.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() |
Is this on a linux/unix system or a winblows system?
-Pizentios
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jul 2004
Posts: 4
Rep Power: 0
![]() |
once again i have an exam tomorrow and i cant seem to answer these specific questions which are in past exam papers. i have alot of content to study and am just trying to get things done quicker.
this is on a unix system i would not normally post these types of questions on a forum but i thought it was the best possible option in such a short manner on time |
|
|
|
|
|
#5 |
|
Expert Programmer
|
I would assume linux since that is where most BASH scripting is done
![]()
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#6 | ||
|
Programming Guru
![]() ![]() ![]() |
Quote:
![]() Quote:
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
||
|
|
|
|
|
#7 | |
|
Programming Guru
![]() ![]() |
Quote:
![]()
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
|
#8 |
|
Programming Guru
![]() ![]() ![]() |
I wonder how the "test" went?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#9 |
|
Programming Guru
![]() ![]() |
yeah...me too, although he never replyed weather or not the man sed helped him or not.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#10 |
|
Programming Guru
![]() ![]() ![]() |
I guess he wanted us to do it for him. lol maybe if he fails a few times he will learn to stop procrastinating.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|