Linux command
csvlens 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
View
csvlens [path/to/file.csv]
Search
csvlens [path/to/file.csv] -f [pattern]
View
csvlens [path/to/file.csv] -d '[delimiter]'
View
csvlens [path/to/file.csv] -c [1,3,5]
说明
csvlens is a command-line CSV file viewer designed for efficiently browsing and searching through CSV data. It provides column-aligned display, interactive search filtering, and keyboard navigation similar to less or vim. The tool automatically detects and aligns columns for easy reading, supports various delimiters beyond commas, and allows filtering data without modifying the original file. It's particularly useful for inspecting large CSV files where traditional editors may struggle with performance.
参数
- -f, --filter _PATTERN_
- Filter rows matching the pattern
- -d, --delimiter _CHAR_
- Specify delimiter character (default: comma)
- -c, --columns _LIST_
- Show only specified columns (comma-separated indices)
- -H, --no-header
- Treat the first row as data, not headers
- -n, --line-number
- Show line numbers
- --tab
- Use tab as delimiter
- --semi
- Use semicolon as delimiter
- -h, --help
- Display help and exit
- -V, --version
- Display version and exit
FAQ
What is the csvlens command used for?
csvlens is a command-line CSV file viewer designed for efficiently browsing and searching through CSV data. It provides column-aligned display, interactive search filtering, and keyboard navigation similar to less or vim. The tool automatically detects and aligns columns for easy reading, supports various delimiters beyond commas, and allows filtering data without modifying the original file. It's particularly useful for inspecting large CSV files where traditional editors may struggle with performance.
How do I run a basic csvlens example?
Run `csvlens [path/to/file.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --filter _PATTERN_ do in csvlens?
Filter rows matching the pattern