Sorry typo Shell Scripting Question
2007-12-24 19:16:00
<DIV>Sorry there was a typo in script.</DIV>
<DIV> </DIV>
<DIV>What am I doing wrong? The purpose of the script is to take the password field for shadow and insert it into the password field in /etc/passwd.</DIV>
<DIV> </DIV>
<DIV>Here is what I'm trying to do. I'm trying to store the first field in /etc/passwd into a var and 3,4,5 and 6th fields, but I don't get any echo $REST? Why is the question</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> </DIV>
<DIV>cat passwd | while read i<BR>do<BR>export i<BR>FIRST=`cut -d: -f1`<BR>REST=`cut -d: -f3-6`<BR>echo $FIRST<BR>echo $REST<BR>done<BR></DIV></DIV><br clear=all><hr>Get your FREE download of MSN Explorer at <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></html>
Comments
Got something to say?
You must be logged in to post a comment.

