GreenTea
GreenTea

Reputation: 1037

How to make two echo string in the same line?

How to make two echo strings in the same line?

#!/bin/bash
echo "A"
echo "B" | grep B

result is:

A
B

but I want it to be:

AB

Upvotes: 1

Views: 2335

Answers (1)

You could avoid the line break in the first echo call with echo -n

Upvotes: 1

Related Questions