mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
Merge pull request #141 from nushell/file_cat
port over to engine-q the script file_cat.nu
This commit is contained in:
commit
4b4b4662ec
1 changed files with 10 additions and 0 deletions
10
engine-q/cool_oneliners/file_cat.nu
Normal file
10
engine-q/cool_oneliners/file_cat.nu
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# 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
|
Loading…
Add table
Add a link
Reference in a new issue