I have multiple text
Name 1:10:34 date short_id 10
Name 1:10:45 date short_id 10
Name 1:20:54 date short_id 20
Name 1:30:43 date short_id 30
Name 1:40:43 date short_id 40
Name 1:40:13 date short_id 40
Name 1:20:01 date short_id 20
Name 1:10:01 date short_id 10
I want to replace the fifth column , but when I use sed 's/\b10\b/user1/g' the second column also changes
The output should look like this :
Name 1:10:34 date short_id user1
Name 1:10:45 date short_id user1
Name 1:20:54 date short_id user2
Name 1:30:43 date short_id user3
Name 1:40:43 date short_id user4
Name 1:40:13 date short_id user4
Name 1:20:01 date short_id user2
Name 1:10:01 date short_id user1
--- update ---
if there is no user1, there will be a name and the second column is just time, it has nothing to do with the name
something like this
Name 1:10:34 date short_id John
Name 1:10:45 date short_id John
Name 1:20:54 date short_id Robert
Name 1:30:43 date short_id Jennifer
Name 1:40:43 date short_id Mary
Name 1:40:13 date short_id Mary
Name 1:20:01 date short_id Robert
Name 1:10:01 date short_id John
sedcommand generate a user2 ? can you edit the OP with a exact copy/paste of the sed command used ?substitute for each user id/name or is there a file with some »translation table« which id is which user?