Skip to content

Commit 832d9c7

Browse files
authored
Update kafka-builder.sh
1 parent 91892cc commit 832d9c7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

DpipelineBuilder/kafka-builder.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ if [ ! -f "$SERVER_FILE" ]; then
66
exit 1
77
fi
88

9-
# Loop through each server listed in the file and execute the update command
9+
# Loop through each server listed in the file
1010
while read -r server; do
1111
if [ -z "$server" ]; then
1212
continue # skip empty lines
1313
fi
14-
echo "Updating files on $server..."
15-
ssh "$server" "$UPDATE_COMMAND"
14+
echo "Connecting to $server..."
15+
ssh "$server" <<- 'SSHCOMMANDS'
16+
echo "Appending text to a file..."
17+
echo "Sample text" >> /path/to/remote/file.txt
18+
echo "Listing directory contents..."
19+
ls -l /path/of/interest
20+
echo "Checking disk usage..."
21+
df -h
22+
echo "Updating system packages..."
23+
sudo apt-get update && sudo apt-get upgrade -y
24+
SSHCOMMANDS
1625
done < "$SERVER_FILE"

0 commit comments

Comments
 (0)