I have file like this:
root:x:0::192.168.164.164
bin:x:1:bin,daemon:192.168.164.164
daemon:x:2:bin,daemon:192.168.164.164
I wish to have a script which transforms the above into:
root;0;;192.168.164.164
bin;1;bin;192.168.164.164
bin;1;daemon;192.168.164.164
daemon;2;bin;192.168.164.164...
I have a file server.txt containing different hostnames like:
hostname1.com
hostname2.com
My shell script servers.sh is written to get the /etc/passwd and /etc/group files from the list in servers.txt file.
I wish to add the hostname from which the entries came from in my final output file...
Hi All,
I have an input file in linux with the following entries:
X:1,2,3,4
Y:5,6,7,8
...and so on
I require an output like below:
X:1
X:2
X:3
X:4
Y:5
Y:6
Y:7
Y:8
Could someone please provide a solution to this?
Regards,
Gaurav
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.