hello how to remove and clear output ?
test.txt
http://urlcom/longStringxyzABC**|**http://urlcom/longStringxyzABC
i want, | including character deletion after
i want result
http://urlcom/longStringxyzABC
thanks
sed 's/|.*//' test.txt
grep -oP '.*?(?=\|)' test.txt
awk -F'|' '{print $1}' test.txt
grep -o outputs both (in general all) matches, which is not desired here.