#!/bin/bash
while read line;
do
cat
done
Hi, I'm trying to get the program to print each line given from stdin. Why isn't the first input being printed here? 2nd and following inputs work fine.
Thanks
Edit: I fixed it by adding a cat before the loop. Can someone explain why it was needed though?