Append a record to the end of a text file: Difference between revisions
Content deleted Content added
Line 2,157:
for rec in records:
echo str(rec)
# Add a new record at the end of password file.
Line 2,171 ⟶ 2,170:
echo "---------------------"
echo str(newRecord)
if pwfile.getLock():
pwFile.writeLine(newRecord)
Line 2,209 ⟶ 2,207:
directory: /home/jdoe
shell: /bin/bash
Appending new record:
Line 2,220 ⟶ 2,217:
directory: /home/xyz
shell: /bin/bash
Raw content of updated password file:
|