This topic has been archived. It cannot be replied.
-
工作学习 / IT杂谈 / need unix script helpThis is Unix script assgnment in class. I have a students list named:classdb.txt
ID:NAME:Course1:course2
001:Harry:Comp123:Comp234
I have to write a script to add new student in the list.
I think should use the "sed" command, but is not working.
please help.
this is what I have try:
echo enter the students ID
read num
echo enter the students name
read name
echo enter the course name
read class1
echo enter the course name
read class2
$sed -f <$num:$name:$class1:$class2> classdb
-harrycy(等待戈多);
2004-11-7
{502}
(#1969584@0)
-
just print to classdb using >>.
-redspider(红蜘蛛);
2004-11-7
(#1969634@0)
-
thanks a lot!
-harrycy(等待戈多);
2004-11-7
(#1970033@0)