Hi, I'm trying to output the return result on terminal by using >; however, I realized that it will overwrite the previous results. I'm wondering if there's a way to append the result to the file instead of overwriting it.
So far this is what I have:

FILENAME=$1
while read FIELDLABEL
do
    curl -k "$FIELDLABEL" > result.txt
done < "$1"

but this will only stores the last result since it keeps overwriting it. Any suggestion? Thanks! :)

Hello,

Yes all you do is use two greater than symbols and it appends rather than overwriting.

curl -k "$FIELDLABEL" >> result.txt

commented: Thanks! +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.