looking for a script or command to push out from a centralized machine to multiple machines. I have the software in place that will do this already, but I need to tell it what command to run on each machine with this file.
what I need is a script or command to edit a file in a specific manner. Say I have a file such as the one below. What I need to do is search the file for a specific line, in this case the line "users_here[tab space]u1=usera,userb,userc", and delete the text "usera,". I don't want it to remove ALL instances of "usera" throughout the file, and I don't want to output this to a new file. I need to search the file for the line, remove 'usera' if it's in THAT specific line, and leave the file intact after it edits/removes "usera" from that line. Any help with this?
here is more text in the file that also contains usera, but i don't want it delete this one. here's another usera, but i don't want it to remove this either.
and here is some more text in the file.
#
ok, I should have been a bit more clear. Some of versions of this file can be varying on some machines. The one identical factor is that the line on every machine will start with 'users_here' (for example, the string after 'u=' might be varying on some machines). So I need a script/command that will search the file for the line starting with 'users_here', and if there happens to be a 'usera' in that line, I want it removed.
I would like to just edit this file and not have to add another step of moving a new file into it's place, if possible.
Looks like the command you ran is not correct. Please verify that again with above suggestions and
if doesn't work, post the command which is giving above error.