English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

create a file using four fileds name roll, phine and address. The field separated is |.

how to:-

1. sort the roll no in reverse order.

2. delete all | from the above file.

3. Replace lower letters with upper case in the above file.

4. To find unique name from the above file.

2006-09-11 07:34:30 · 4 answers · asked by benam 1 in Computers & Internet Programming & Design

4 answers

Get a book of Unix Shell scripts ..amd try again ..You will get the answer ..
Have a nice Day

2006-09-11 08:56:23 · answer #1 · answered by Ranjith 3 · 0 1

I think this sounds like a homework question, so my answers are designed to point you in the right direction and help you learn.

In the Unix shell, there are different programs that can help with these problems:

1. the "sort" command. Look at the manual page with the command "man sort" and look for a switch to reverse the sort order.

2. the "tr" command. Again, use "man tr" to look at the manual page. There are examples there that should help you.

3. Perl might is a good choice for this, but may take more time to learn than the command I listed for 1 and 2. Look at "man pertoc" for an overview. Look into things like "perl -e '...' filename". You can do this as a 1-line command on the Unix prompt.

4. You can loop over the contents of a file with the "read" command. For example, with a "for" or "while" loop. Look at the documentation for your shell. For example, if you use bash, try "man bash" and look for the section that talks about "for" and "while" loops.

As you can see, manual pages (via the "man" command) can be a big help!

Good luck!

2006-09-11 09:38:20 · answer #2 · answered by Anonymous · 1 0

with the aid of fact there replaced right into a time as quickly as we had what we called families and it replaced into basically predicted you're looking after your guy or woman, inspite of the style you felt approximately one yet another. You have been a shame in case you probably did no longer, welfare replace all that. And it rather is not as much as the church homes to do all of it the two, they paintings with the kin as quickly as we had families. Like as quickly as we had a majority of those people bawling approximately Katrina months on end this one previous guy in between the Scandinavian countries stated we guard our very own. We get flooding and all that rather everyone comes jointly and works jointly to place life back to regularly occurring.

2016-11-07 02:54:50 · answer #3 · answered by shuey 4 · 0 0

what scripting language are you using? If you can use any, I recommend creating a Perl script, as I don't know of any shell script (bash, c shell, etc.) that has a built in sort function or capitalize function. This sort of thing is why Perl was created.

This looks like a good Perl tutorial - http://www.comp.leeds.ac.uk/Perl/basic.html

2006-09-11 09:09:01 · answer #4 · answered by John J 6 · 0 0

fedest.com, questions and answers