Read line from file or standard input....

Domain/Linux 2013.11.28 14:25

Code...


#!/bin/bash

if [[ x$1 = x ]]; then
    f=${1:-/proc/${$}/fd/0}
else
    f=$1
fi

while read line
do
    echo $line
done < $f


신고
Trackback 0 : Comment 0

티스토리 툴바