cris7
February 6th, 2015, 09:12 PM
I'm at a total loss on how to automate this process, and not have to manually edit my script every time I need to run it. I'm guessing maybe GREP or PED might be used, but since I don't know how to use those functions much I don't know how to even search for how to do this.
What I have to do is:
1-update a Twinkle buddylist (file is in the format of xxxx.bud, where xxxx=4 digit extension being used by Twinkle at that machine)
2-copy that .bud file to a list of IPs in the office
-sometimes a machine may not be on the network, but I don't want to have to go in and edit the script to account for this every time I run it just to keep the script from jamming up.
3-when copying the .bud to the machines, it needs to read the extension name on that machine and name the .bud file to match
-The extension can be found by looking at the .cfg file name in the directory the .bud is going into (ie. 2222.cfg).
Step one will be done manually, it's only listed here because the script will pull that file once I've edited it. So no need to include Step 1 in the script.
An example of this process might look like this:
I have an updated 1111.bud file on IP123. I need to copy it to the following machines (their Twinkle extension is listed in (), .bud filename listed after in ())
IP456 (2222) (2222.bud)
IP789 (3333) (3333.bud)
IP987 (4444) (4444.bud)
IP654 (5555) (5555.bud)
IP321 (6666) (6666.bud)
Currently I have a script that I manually enter the .bud file name for each IP, looking up the information each time. I have a long list of IPs to copy to, so this eats up a bunch of time just to update the script each time. If I can get a script to behave like I'm looking for, I also don't have to worry about the many possible typos on the extensions as I type them in.
Any help would be greatly appreciated, both in examples and how to find stuff like this in the future. I'm usually pretty good with web searches, but when it comes to scripting I'm still learning how to search for stuff.
What I have to do is:
1-update a Twinkle buddylist (file is in the format of xxxx.bud, where xxxx=4 digit extension being used by Twinkle at that machine)
2-copy that .bud file to a list of IPs in the office
-sometimes a machine may not be on the network, but I don't want to have to go in and edit the script to account for this every time I run it just to keep the script from jamming up.
3-when copying the .bud to the machines, it needs to read the extension name on that machine and name the .bud file to match
-The extension can be found by looking at the .cfg file name in the directory the .bud is going into (ie. 2222.cfg).
Step one will be done manually, it's only listed here because the script will pull that file once I've edited it. So no need to include Step 1 in the script.
An example of this process might look like this:
I have an updated 1111.bud file on IP123. I need to copy it to the following machines (their Twinkle extension is listed in (), .bud filename listed after in ())
IP456 (2222) (2222.bud)
IP789 (3333) (3333.bud)
IP987 (4444) (4444.bud)
IP654 (5555) (5555.bud)
IP321 (6666) (6666.bud)
Currently I have a script that I manually enter the .bud file name for each IP, looking up the information each time. I have a long list of IPs to copy to, so this eats up a bunch of time just to update the script each time. If I can get a script to behave like I'm looking for, I also don't have to worry about the many possible typos on the extensions as I type them in.
Any help would be greatly appreciated, both in examples and how to find stuff like this in the future. I'm usually pretty good with web searches, but when it comes to scripting I'm still learning how to search for stuff.