i don't know what's wrong with the code, says too many arguments in the first two if statements. how to change it? thx.
the file is like in this format:
;dfs;dfdsf;fsd ff dsf;dfdffdfd;
-f2 should be only one word with no space, but could be like this 'n/a', '**ABC'
while read line; do
s=`echo $line|cut -d';' -f2`
yn=`echo $s | grep "\." | wc -l`
if [ -z $s ]; then
continue
fi
if [ $s == "COMPANY" ]; then
continue
fi
if [ $yn = 0 ]; then
echo ${line}${fdd}';' >> $DSTDIR/scan_er.txt
fi
done < $DSTDIR/scan_er2
---------- Post updated at 05:41 PM ---------- Previous update was at 05:41 PM ----------
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.