Sponsored Content
Full Discussion: Update remove files
Top Forums Shell Programming and Scripting Update remove files Post 302999443 by seanbeag on Tuesday 20th of June 2017 10:00:52 AM
Old 06-20-2017
Facebook

Hi Robin, thanks for the response:


  • How would you do this without automation?
Currently the way this is done is by literally consoling onto every virtual machine in the environment. The hosts file is then updated, some software downloaded from an ftp site and the software is then installed. I'm trying to automate the whole process, because this is time consuming and antiquated.
  • What have you tried so far?
I currently have a bash script I run locally where I can update my own hosts file, and one or two remote hosts files, but this is done by tying in the name of each remote machine one by one and I don't really want to go testing this in a virtual environment
  • What output/errors do you get?

  • What OS and version are you using?
As it's a virtual environment there's a mixture of OS types, Windows, CentOS, Linux, OpenSuse etc
  • Do you have security credentials set up on each server? (password-less login for scheduled tasks)
Not presently not. There are certain accounts that will work across multiple VMs though
  • What are your preferred tools? (C, shell, perl, awk, etc.)
I don't really have a preferred tool
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Would ideally like to be able to run a script that will connect to a pre-defined list of remote VMs and:
1 - Update their host file
2 - Copy some install files to a directory on that remote VM and kick off the install
3 - Start the service post install

Most importantly, What have you tried so far?

This is well outside my comfort zone to be honest so I'm hoping for something that may be tried and tested. If that doesn't exist then no worries
 

10 More Discussions You Might Find Interesting

1. Programming

Check files update

Hi, I want to monitor a file, and check what has been added to it. etc: The text file contain "abcdef" And now it contain "abcdefghi". I need to know what had been added, is there any function that can do this? Thx for helping me. (3 Replies)
Discussion started by: AkumaTay
3 Replies

2. UNIX for Dummies Questions & Answers

compare update time of files

Hi, does anyone know of a way to compare files update time (not only days - also hours and minutes) (command? scripts? perl scripts?) Dori (8 Replies)
Discussion started by: dorilevy
8 Replies

3. Shell Programming and Scripting

compare two files and to remove the matching lines on both the files

I have two files and need to compare the two files and to remove the matching lines from both the files (4 Replies)
Discussion started by: shellscripter
4 Replies

4. Shell Programming and Scripting

Update a column value in csv files

Hi all I am new to scripting and i have an application from which i will export into a csv file as follows Column1, Column2, Column3 Sno1, Folder\Test.txt, Fail Sno2, Folder\Test1.txt, Pass Sno3, Folder\Test2.txt, Fail Now i need to change the column2 in all the rows from "Folder\" ... (1 Reply)
Discussion started by: rajeshrp
1 Replies

5. UNIX for Advanced & Expert Users

update files and preserve date

I have a bunch of historical files that need to be modified, as the file source announced there is an error in them which should be corrected. I am planning to use sed to do the mass update, but I would like to know if there is a way to preserve files last modified date/time, so later ls -ltr... (3 Replies)
Discussion started by: migurus
3 Replies

6. Shell Programming and Scripting

Remove duplicates and update last 2 digits of the original row with 0's

Hi, I have a requirement where I have to remove duplicates from a file based on the first 8 chars (It is fixed width file of 10 chars length) and whenever a duplicate row is found, its original row's last 2 chars should be updated to all 0's. I thought of using sort -u -k 1.1,1.8... (4 Replies)
Discussion started by: farawaydsky
4 Replies

7. Solaris

Command to remove existing files in the tar files in Solaris 10

Hi, I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios. 1)How to delete the existing files in the tar file. suppose i have a main tarfile named application.tar and it contains a file called ingres.tar. what is the command to remove ingres.tar... (2 Replies)
Discussion started by: muraliinfy04
2 Replies

8. Shell Programming and Scripting

How to compare 2 files and update one?

Hi, I have got 2 files which i need to compare and append based on the below conditions. file 1: File 1 has data in the following format 4300 2356 C234 5689 5500 2345 File 2 has data in the same fomat 4300 49 5555 12345 Now i need to compare the first 4 bytes in each line... (4 Replies)
Discussion started by: roy121
4 Replies

9. Shell Programming and Scripting

Bash to update files to be used by awk

In the below bash there are 6 .txt files in /home/cmccabe/Desktop/comparison/ref_val/ that are being updated from the 6 .vcf files in /home/cmccabe/Desktop/comparison/validation/files/*.vcf. The awk in the post updates the files with the information, however the files are not being updated so the... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. Shell Programming and Scripting

Remove duplicated records and update last line record counts

Hi Gurus, I need to remove duplicate line in file and update TRAILER (last line) record count. the file is comma delimited, field 2 is key to identify duplicated record. I can use below command to remove duplicated. but don't know how to replace last line 2nd field to new count. awk -F","... (11 Replies)
Discussion started by: green_k
11 Replies
UPSCLI_LIST_START(3)						    NUT Manual						      UPSCLI_LIST_START(3)

NAME
upscli_list_start - begin multi-item retrieval from a UPS SYNOPSIS
#include <upsclient.h> int upscli_list_start(UPSCONN_t *ups, int numq, const char **query) DESCRIPTION
The upscli_list_start() function takes the pointer ups to a UPSCONN_t state structure, and the pointer query to an array of numq query elements. It builds a properly-formatted request from those elements and transmits it to upsd(8). Upon success, the caller must call upscli_list_next(3) to retrieve the elements of the list. Failure to retrieve the list will most likely result in the client getting out of sync with the server due to buffered data. USES
This function implements the "LIST" command in the protocol. As a result, you can use it to request many different things from the server. Some examples are: o LIST UPS o LIST VAR <ups> o LIST RW <ups> o LIST CMD <ups> o LIST ENUM <ups> <var> o LIST RANGE <ups> <var> QUERY FORMATTING
To see the list of variables on a UPS called su700, the protocol command would be LIST VAR su700. To start that list with this function, you would populate query and numq as follows: int numq; const char *query[2]; query[0] = "VAR"; query[1] = "su700"; numq = 2; All escaping of special characters and quoting of elements with spaces are handled for you inside this function. ERROR CHECKING
This function checks the response from upsd(8) against your query. If it is not starting a list, or is starting the wrong type of list, it will return an error code. When this happens, upscli_upserror(3) will return UPSCLI_ERR_PROTOCOL. RETURN VALUE
The upscli_list_start() function returns 0 on success, or -1 if an error occurs. SEE ALSO
upscli_fd(3), upscli_get(3), upscli_readline(3), upscli_sendline(3), upscli_ssl(3), upscli_strerror(3), upscli_upserror(3) Network UPS Tools 05/31/2012 UPSCLI_LIST_START(3)
All times are GMT -4. The time now is 10:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy