Files
dotfiles/dot_config/nushell/nu_scripts/sourced/cool-oneliners/file_cat.nu
Cian Hughes 896af887ca Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows)
and improves grepability with neovim/telescope
2024-11-07 13:52:17 +00:00

12 lines
239 B
Nu

# Combine two files into one
def create_files [] {
[0,1,2,3] | range 0..3 | save a.json
[4,5,6,7] | range 0..3 | save b.json
}
create_files
echo (open a.json) (open b.json) | save c.json
open c.json | flatten
rm a.json b.json c.json