I know it's a silly google question, but I didn't find something really simple for my need.
I have a .txt file with the following content:
hostname [ip] exec /bin/bash
Now, every time when I execute a certain PS script(from RUN) I want that [ip] will be changed according to my $args
hostname 188.8.131.52 exec /bin/bash
I am executing from run
hostname 184.108.40.206 exec /bin/bash
Note! The whole content will be always the same, only [ip] changes.
I am looking for the most simple replace solution, thanks :)