The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 337 Weeks Ago, 4 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
INT 1700 – Understanding Operating Systems
Supplemental Lab Assignment 1
Mr. Bugg - Page 1
This lab involves a little preparation in the form of creating a file to use. You will use the Notepad to create the file. The name of the file, which you will create on your C: drive is:
ph.txt
Each line of the file contains six items of data: Last name, first name, area code, telephone number, a key word that identifies a category and a short description. The key words are cust for customer, cons for consultant, and vend for vendor.
It is important that the data be entered in exact column locations for processing later on. The first is shown with periods marking the number of spaces between items. Press the space bar once for each period.
Jones.....Michele...(747).429-6360..cons.chemist
Smith John (747) 926-2945 vend furniture
White Alice (747) 425-7692 cust Accountant
Green Fred (541) 926-4921 cust math teach
Black John (747) 426-3385 cons mech eng pkg
Smith Ed (541) 835-8747 vend caterer
Jones Alison (747) 429-5584 cons Chem engineer
Hill Dave (747) 463-2000 vend IBM sales
Jones James (747) 636-3541 cust architect
Black Alice (747) 426-7145 cust Elec eng
1 11 21 27 37 42
Note: the numbers above indicate starting location for
each column of data.
At a C:> prompt, type in the command type to display the file and make sure it is there.
Now we will use this file with some of the filter commands.
1. At the prompt, enter find "Wh" ph.txt
Record what you see: ___________________________________________________
2. Enter sort < ph.txt
What is displayed: ______________________________________________________
3. Enter sort /r < ph.txt
What is displayed? ______________________________________________________
INT 1700 – Understanding Operating Systems
Supplemental Lab Assignment 1
Mr. Bugg - page 2
4. Suppose you want to arrange the list by key word. The keyword begins in col. 37.
Enter sort /+37 < ph.txt
What is displayed? ______________________________________________________
Enter the same command, but this time redirect the output to a disk file called sortph.txt.
5. The find command is used to locate particular strings within a file.
Enter find "cons" ph.txt to find all the consultants.
What displays? _________________________________________________________
6. The find command can work on more than one file. To illustrate this:
Make a copy of ph.txt on your disk called ph1.txt using the copy command.
Enter find "cons" ph.txt ph1.txt
What displays? _________________________________________________________
7. The find command does not require full words - it uses strings.
Enter find "eng" ph.txt
What displays? _________________________________________________________
8. Enter find /i "chem" ph.txt
What displays? _________________________________________________________
What do you think the function of the /i parameter is? __________________________
(Hint: if you cannot guess, try the command again without the /i parameter)
9. Enter find /v "(747" ph.txt
What displays? _________________________________________________________
What is the apparent function of the /v paramter? ______________________________
10. Enter find /n "Smith" ph.txt
What displays? _________________________________________________________
What is the function of the /n parameter? _____________________________________
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly