Sending CLI Output to Whatsapp using Command Line

System Requirements:

Step 1:

Step 2:

# Accept the phone number of the receiver from user
read -p "Enter the phone number of receiver in international format: " phoneNumber
# Read the command required to execute from the user
read -p "Enter the command you want to execute: " rhelCommand
# Executing the command and storing command output in the variable
# Replacing space, + sign with %20
messages=`echo $message | sed 's/ /%20/g' | sed 's/+/%20/g'`
# Creating the link with phone number and command line output
echo $link

Step 3:

$ var=$(sh
CliToWhatsapp: Accepting input

Step 4:

$ google-chrome $var
CliToWhatsapp: Opening Whatsapp message link with google chrome
CliToWhatsapp: Whatsapp chat windows with automatically filled CLI output

Step 5:

Tech blogger, researcher and integrator