I am in the progress of consolidating my 2 NIS databases into 1. My first step is to get the NIS record for particular department. I have software.csv which contain list of name in.
software.csv:
John Travolta
Elthon John
Sean King Ston
Taylor Swif t
Nicole cage
.......
I create a simple script to read from software.csv , called genlist.sh
Expand|Select|Wrap|Line Numbers
- #!/bin/sh
- list_source="software.csv"
- cat $list_source | while read LINE; do
- N=$((N=1))
- echo '"${LINE}"'
- ypcat passwd | grep \"$LINE\"
- done
John Travolta
grep: Travolta": No such file or directory
Elthon John
grep: John": No such file or directory
Sean King Ston
grep: King: No such file or directory
grep: Ston": No such file or directory
Taylor Swif t
grep: Swif: No such file or directory
grep: t": No such file or directory
I tried with many way to play around with my second last line but still not able to resolve.
Can anyone please help me in this case? Your help is appreciated!