Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
- The problem statement, all variables and given/known data:
Write a script calleduser.sh
that parses the name and password of given in a file (user.txt
) and creates the user using first letter of first name followed by full last name. the password should be the third field.
First name Last Name Password
Johanna Osbourne TeSTiNg143
- Relevant commands, code, scripts, algorithms:
First name Last Name Password
Johanna Osbourne TeSTiNg143
- The attempts at a solution (include all code and scripts):
#!/bin/bash
for row in `cat $1`
do
if [ $(id -u) -eq 0 ]; then
username=${row%:*}
password=${row#*:}
#echo username
#echo password
- Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
CUNY Medgar EVers, Brooklyn, ny, Prof. harris CIS 440
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).