Issue in shell script

Please answer Scrutinzer's question: Is this homework?

If it isn't there are a few other questions that need to be answered:

  1. What shell are you using?
  2. Note that in your sample data, you have two items that have the same "highest quantity" sold and two other items that have the "highest number of sales transactions". How do you determine which should be given the "highest" label? (Or, more to the point, why don't you report all items with the same statistics when there is a tie?)
  3. You said you wanted your script to print three values. Are all of the files your script creates used for later processing? Or, are they just artifacts left over after your script completes?
  4. Could you please explain why you believe that the following code is needed in your script?:
	cut -f1 -d ',' log |grep -v item| sort -u >> 1
	for a in `cat 1`
	do
	touch $a
	done
1 Like