Say I have a large file with many rows and many columns. I\'d like to find out how many rows and columns I have using bash.
For rows you can simply use wc -l file
-l stands for total line
for columns uou can simply use head -1 file | tr ";" "\n" | wc -l
Explanation
head -1 file
Grabbing the first line of your file, which should be the headers,
and sending to it to the next cmd through the pipe
| tr ";" "\n"
tr stands for translate.
It will translate all ; characters into a newline character.
In this example ; is your delimiter.
Then it sends data to next command.
wc -l
Counts the total number of lines.