Hi,
I am in need of help on reading through a file(servernames.dat) which has a list of server names, while it reads each file name it has to connect to that server and run another script, once it has executed the script on one server, it has to go back to the list of servernames to get the next server name and do the same.
The issue is wiht reading through the svrnames.dat file, it reads first line, executes the script on that server and exits from teh script.
The code i have tried are below
I had also tried
in the log, once it is done with the first server, it goes back to the while command prints "read servername" and then exits!
I intend to do the same for 16 servers Kindly help as soon as possible!! Please
Moderator's Comments:
Please use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks.
Last edited by zaxxon; 05-26-2011 at 08:07 AM..
Reason: code tags
When reading a file this way, the contents are available to all programs called within. And the ssh client will usually read as much information from stdin as possible, and send it to the remote side, even if not used. Disable the TTY allocation by running ssh as
Hi,
I'm trying to get a line returned as is from the below input.csv file in Bash in Linux, and somehow I get an unexpected newline in the middle of my input.
Here's a sample line in input.csv
$> more input.csv
TEST_SYSTEM,DUMMY@GMAIL.COM|JULIA H|BROWN
And here's a very basic while loop... (7 Replies)
I have below script to read a file line by line. How can I ensure that the loop will stop after last line.
#!/bin/bash
while read -r mod ver tarball; do
echo $mod
done < taskfile.txt (4 Replies)
Hi All,
I am facing a strange problem with my code, I have a script which does housekeeping of oracle DB generated files. We have multiple DB's running with different OS users, so we are executing the script as root user, which will generate a dynamic script for each DB, and it will switch to... (8 Replies)
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Guys,
I have a requirement as below.
consider,if i use df command, its getting the below output.
file system kbytes used avail %used Mounted on
/dev/sample/ 45765 40000 5765 50% /
/dev/filesys/ 30000 20000 1000 80% /u
....
....
Now i wanted to cut the /u... (11 Replies)
I was analyzing the Disk read using hdparm utility.
This is what i got as a result.
# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 108 MB in 3.04 seconds = 35.51 MB/sec
# hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 3496 MB in 1.99 seconds = 1756.56 MB/sec... (1 Reply)
After I using the search tool, I still can't find a solution that was related with my trouble.
My input file:
@HWI-ABC123_30DFGGDA:1:100:3:1234
ACGTAGTACCCGGGTTTTTTTTTAAAAAAA
+HWI-ABC123_30DFGGDA:1:100:3:1234
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@HWI-ABC555_30DFGGDA:1:100:3:1234... (14 Replies)
Guys,
Is there any UNIX command that captures the 'Unix process which is performing high disk I/O reads and writes'.
can you help me in this?
-Swamy (6 Replies)
I would like to write shell/perl script which identifies the top unix processes that are performing high disk I/O's or/and writes
If any one knows the solution please help me?
-Swamy (0 Replies)
hi all
i have a program in C (Unix Solaris 5.7) and i want to read a string from keyboard, but the "scanf" doesn´t reads spaces.
example:
....
char name;
....
printf("Enter your name: ");
scanf("%s",&name);
printf ("Your name is: %s", name);
and if i write Kevin Costner ... (4 Replies)