Script only processes 1st Line of input file

Script only processes 1st Line of input file

bash script to read a file and process commands remotely. It currently only processes the first line (server1)

bash script to read a file and process commands remotely. It currently only processes the first line (server1)

Need to remotely process 3 commands on server1 , then server2 ......

#!/bin/bash

while read line; do sshpass -f password ssh -o StrictHostKeyChecking=no [email protected]$line zgrep "^A30=" /var/tmp/logs1/messages.* | >> Output.txt sshpass -f password ssh -o StrictHostKeyChecking=no [email protected]$line zgrep "^A30=" /var/tmp/logs2/messages.* | >> Output.txt sshpass -f password ssh -o StrictHostKeyChecking=no [email protected]$line zgrep "^A30=" /var/tmp/logs3/messages.* | >> Output.txt done < file1

file1:

server1
server2
server3


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Linux Tutorial - Shell Bash Commands from the Beginning with Examples

Linux Tutorial - Shell Bash Commands from the Beginning with Examples. Learn BASH command interpreter explained step by step and with examples. Learn what Linux is and how the command interpreter fits into the operating system. Get and install Linux. Understand the structure and syntax of Linux commands. Learn to manage the elements of the filesystem: files and directories. Learn to install software from official servers or from any compatible file.

Linux Terminal Tutoria - Beginner's Tutorial to the Bash Terminal

Welcome to this course on Linux Terminal Tutoria - Beginner's Tutorial to the Bash Terminal. What is Command Line and why is it so popular? People thinking about being a Linux system administrator or engineer can use this as the perfect place to start learning the basics from

Moving Your JavaScript Development To Bash On Windows

In this article, we’ll take an in-depth look at how to set up a Windows/Linux development box for JavaScript development.