Results 1 to 3 of 3
Hi guys I have been given a assignment to create a script that searches an employee list for certain info here it is the beginning of my search algorithm
cat ...
- 05-22-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 8
[SOLVED] trying to create script for school
Hi guys I have been given a assignment to create a script that searches an employee list for certain info here it is the beginning of my search algorithm
cat -n emplistdpsmt > .employeeList_numbered
cut -c19-33 .employeeList_numbered > .employeeNames
cat -n .employeeNames > .employeeNames_numbered
grep $name_entered .employeeName_numbered > .names_found_with_numbers
cut -c5-6 .names_found_with_numbers > search_for_these_numbers
now basically with in the file search_for_these_numbers
will contain numbers like so
3
5
4
now what i want to be able to do with these numbers is grep the contents of search_for_these_numbers and search in the file .employeeList_numbered for any of the numbers in search_for_these_numbers and redirect the matches to a file.
In other words is there a way I can grep for 3 and 5 and 4 within the file .employeeList_numbered
sort of like taking in arguments for the grep command from a file.
ty for any help in advance
- 05-22-2009 #2
Welcome to LinuxForums
Is this for a class project?
If so, I'm sorry... but homework questions are against Forum Rules.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 05-22-2009 #3Just Joined!
- Join Date
- May 2009
- Posts
- 8
yes it is for class oh sorry i didnt know it was against the rules and i have figured it out thanks anyway


