![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| changing text | outthere_3 | Shell Programming and Scripting | 2 | 02-12-2008 09:46 PM |
| Changing text in the command prompt | unipepper | Shell Programming and Scripting | 10 | 03-07-2007 09:49 AM |
| Changing Text Color Using VT100 | Abed Alnaif | UNIX for Advanced & Expert Users | 4 | 11-27-2006 01:10 PM |
| changing last 2 digits of text | kingdbag | Shell Programming and Scripting | 4 | 11-07-2006 02:51 PM |
| changing size of text at xterm | armen | Shell Programming and Scripting | 3 | 04-25-2005 06:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi everyone,
Having trouble with sed. I searched the board and found some stuff, but still unclear. I have a file named "userfile" which stores the users info in this form: email:username:password: I want the user to be able to change their password. i tried with sed s/oldpass/newpass/g userfile and it displayed to the standard output correct. then when i checked the userfile, it was still using the old password. Then i found the "c" flag which is change. but then i try to test sed s/oldpass/newpass/c userfile i get a message Function s/oldpass/newpass/c cannot be parsed Can anyone help me? im just trying to allow a user to update their password and have the changes saved in userfile. thanks! primal |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try ...
sed "s/oldpass/newpass/g" userfile > userfile.new mv userfile userfile.old mv userfile.new userfile |
|
#3
|
|||
|
|||
|
whoo-hoo!!
thanks Cameron primal |
|||
| Google The UNIX and Linux Forums |