[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
while read ORIGINAL1; do
NORM=$(echo $ORIGINAL1 | cut -d ':' -f3);
for O in $( cat $NEW | cut -d':' -f3 )
if [ $NORM -ne $O ]; then
echo $ORIGINAL1 >> $NEW
done < $COPY
Okay, the last question here. I think.
My goal here is to get lines from /etc/passwd that do not have a UID that
is already in the $NEW file.
What I have above adds a line each time a UID in $COPY is not match with
each UID being compared from within $NEW. So, each line is added repeated
times, which makes for a large file :)
How can I make it such that the UID being extracted from $COPY is compared
with each UID in $NEW before being added to the $NEW file?
ps. without using perl ;)
To unsubscribe, send email to email@example.com with
"unsubscribe luci-discuss" in the body.