Robert Perez-Corona
asked on
Script to list hostnames with a pipe symbol to separate
Hello,
I have a list of about 500 servers in an excel spreadsheet that I need to enter into a particular format:
[host::(hostname1|hostname2|hostna me3|hostna me4)]
I don't want to enter the 500 server names manually followed by a pipe several hundred times..
Is there a way I can parse the list of server names so that it outputs like BWICTXD01|BWIZDCD01|BWILIC D01)]
Thanks much
t
I have a list of about 500 servers in an excel spreadsheet that I need to enter into a particular format:
[host::(hostname1|hostname2|hostna
I don't want to enter the 500 server names manually followed by a pipe several hundred times..
Is there a way I can parse the list of server names so that it outputs like BWICTXD01|BWIZDCD01|BWILIC
Thanks much
t
No clue what you are talking about ;-) What is input and output?
ASKER
please excuse my lack of programming knowledge..
I have a list of 500 servers. As an example I am only using four.
the input would be a simple list..txt...docx..
host1
host2
host3
host4
I want the output to be this
(host1|host2|host3|host4)
thanks in advance
t
I have a list of 500 servers. As an example I am only using four.
the input would be a simple list..txt...docx..
host1
host2
host3
host4
I want the output to be this
(host1|host2|host3|host4)
thanks in advance
t
ASKER
the output may also go into a txt file.
It sounds simple. But being a newb programmer, this is currently over the top of my head
It sounds simple. But being a newb programmer, this is currently over the top of my head
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think the input file is excel.
Instead of 4 per your example, you want one long string of 500?
Instead of 4 per your example, you want one long string of 500?
ASKER
Thanks Justin. I will give that a try right away.
NewVillage, Yes the file is in excel, but I can transfer the entire column to text only on a word/txt file which i will try to point to per justins instructions
NewVillage, Yes the file is in excel, but I can transfer the entire column to text only on a word/txt file which i will try to point to per justins instructions
ASKER
Thanks a bunch justin !!! that worked flawlessly.
i had an issues executing the .ps1
cannot be loaded because the execution of scripts is disabled on this system.
But i ran this below and all worked fine afterwards
I have ran set-executionpolicy unrestricted
cheers
t
i had an issues executing the .ps1
cannot be loaded because the execution of scripts is disabled on this system.
But i ran this below and all worked fine afterwards
I have ran set-executionpolicy unrestricted
cheers
t
no problem and happy new year
ASKER
likewise J !