insert tab at beginning of each line in file - and other sed questions
Firstly, I've searched at length and can't seem to find the info so I decided to join this community and ask away. If this is a question that has been answered a billion times please point me in the right direction.
I am trying to create a shell script where a user can specify a file with a list of logins and the script will create a batch file with specific information in specific columns.
I need the output to be as below:
1 User1 Date 12/31/9999
2 User2 Date 12/31/9999
3 User3 Date 12/31/9999
Where the columns are separated as below.
I can use the nl utility to get the numbers easily enough, but I need two tab separations between the number and the user list. Is there a sed command that will insert at the beginning of each line? If so I can just run nl after I get some tabs up in the front.
Any assistance is appreciated.