Использование awk:
BEGIN { RS = "" ; }
{
printf "%s %s %s %s %s %s %s\n", $1, $2, $3, $4, $5, $6, $7
}
производит:
WEBA 30-MAR-17 NA NOT_STARTED 01-APR-17 25-MAR-17 Target_Not_Started
WEBA 29-MAR-17 NA NOT_STARTED 01-APR-17 25-MAR-17 Target_Not_Started
WEBA 28-MAR-17 NA STARTED 01-APR-17 25-MAR-17 Target_Started
Вы можете использовать bash, если вам нужно. Использование цикла и условия if, например:
#!/bin/bash
filename="/root/a.txt"
while read -r line
do
if [ "$line" != "" ]; then
echo $line |tr -d "\n"
else
echo ""
fi
done <"$filename"
perl -l -00pe 'y/\n/ /' yourfile | column -t
< yourfile \
sed -ne '
/^WEBA/,/^$/!d
/^$/g
s/\n/ /gp
H
/^WEBA/h
' \
| column -t