Linux command
csvlook 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display CSV as table
csvlook [data.csv]
Limit rows displayed
csvlook --max-rows [10] [data.csv]
Limit column width
csvlook --max-column-width [20] [data.csv]
Hide line numbers
csvlook --no-number [data.csv]
Use different delimiter
csvlook -d ";" [data.csv]
Read from stdin
cat [data.csv] | csvlook
说明
csvlook renders CSV data as a fixed-width table for terminal viewing. It's part of csvkit and provides a quick way to preview CSV files in a readable format. The tool auto-sizes columns based on content and displays data with ASCII borders, making it easy to inspect data structure and values.
参数
- -H, --no-header-row
- Input has no header row.
- --max-rows _n_
- Maximum rows to display.
- --max-column-width _n_
- Truncate columns at width.
- --max-columns _n_
- Maximum columns to display.
- -y _n_, --snifflimit _n_
- Rows to sniff for delimiter.
- --no-number
- Don't display row numbers.
- -d _char_
- Field delimiter.
- -q _char_
- Quote character.
- -e _encoding_
- Input encoding.
FAQ
What is the csvlook command used for?
csvlook renders CSV data as a fixed-width table for terminal viewing. It's part of csvkit and provides a quick way to preview CSV files in a readable format. The tool auto-sizes columns based on content and displays data with ASCII borders, making it easy to inspect data structure and values.
How do I run a basic csvlook example?
Run `csvlook [data.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -H, --no-header-row do in csvlook?
Input has no header row.