Cross-platform cat command.
A JavaScript package, behaving exactly as Linux cat command, supporting all the options such as line numbering. Written in TypeScript natively.
npm install cross-cat --global
cat <filename>
cat my_awesome_file.txt
Command | Explanation |
---|---|
cross-cat <filename> |
For example, in case of PowerShell, ensure that this module is run instead of cat built-in alias to Get-Content |
npx cross-cat <filename> |
To run without installation |
cross-cat --help |
To get all the available options |
package.json
scripts"scripts": {
"show:awesome": "cross-cat \"/awesome folder/awesome filename\""
}
Currently runs via npx of locally installed package cannot process filenames with spaces correctly due to npm behavior. Workaround:
node node_modules/cross-cat/src/cross-cat.js <filename>
+
: Working
=
: Non applicable
-
: Not working (workaround above)
Command used | Global | Local | Not installed |
---|---|---|---|
cat | + | = | = |
cat (from script) | + | + | = |
cross-cat | + | = | = |
cross-cat (from script) | + | + | = |
npx cross-cat | - | - | + |
npx cross-cat (from script) | - | - | + |
node cross-cat.js | + | + | = |
Generated using TypeDoc