DonCash
Jun 27th, 2007, 07:28 AM
Hey,
I'm using the Unix SED command to try and add text to the end of a file.
Here is my current example:
#!/bin/bash
sed "s/./username/" users.txt
This adds 'username' to the beginning of every line in the users.txt file.
Example:
username john1
username mary2
username hiller3
How can I make it so that it adds this just once at the very bottom of the file?
Desired output:
john1
mary2
hiller3
username
Cheers for your help!! :duck:
I'm using the Unix SED command to try and add text to the end of a file.
Here is my current example:
#!/bin/bash
sed "s/./username/" users.txt
This adds 'username' to the beginning of every line in the users.txt file.
Example:
username john1
username mary2
username hiller3
How can I make it so that it adds this just once at the very bottom of the file?
Desired output:
john1
mary2
hiller3
username
Cheers for your help!! :duck: