NEW: xonsh examples
This commit is contained in:
parent
4ae354c009
commit
22a665f1e8
9
xonsh/LinesToList.xsh
Executable file
9
xonsh/LinesToList.xsh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env xonsh
|
||||
print("Method1: map and str.strip")
|
||||
for i in map(str.strip, !(cat /tmp/test.txt)):
|
||||
print(i)
|
||||
|
||||
print("Method2: splitlines")
|
||||
#for j in $(cat /tmp/test.txt).splitlines():
|
||||
for j in !(cat /tmp/test.txt).out.splitlines():
|
||||
print(j)
|
Loading…
Reference in New Issue
Block a user