English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Homework problem I'm stuck on:

2 Files, each with 4 records of different column data.

I have to create a script where I check to make sure the record counts match, and display appropriate messages, then do some other stuff (which I think I know how to do)

Basically I need to know how to compare the record counts.

I was thinking the "wc" command, but it prints the filename with it so I can't use it in "if" statements.

This is intended to be a simple problem though so I think there must be an easier way.

If anyone could help It would help me a lot. Thanks

2006-10-17 18:41:35 · 1 answers · asked by Dan H 1 in Computers & Internet Programming & Design

1 answers

I think you are on the right track. wc -l returns the number of lines. Also you can always use cut to get a piece of columnar data.

2006-10-17 19:10:04 · answer #1 · answered by Gizmo L 4 · 0 0

fedest.com, questions and answers