16 lines
379 B
Awk
16 lines
379 B
Awk
|
|
BEGIN {
|
||
|
|
ls = sys2var("ls")
|
||
|
|
print ls
|
||
|
|
}
|
||
|
|
function sys2var(command ,fish, scale, ship) {
|
||
|
|
command = command " 2>/dev/null"
|
||
|
|
while ( (command | getline fish) > 0 ) {
|
||
|
|
if ( ++scale == 1 )
|
||
|
|
ship = fish
|
||
|
|
else
|
||
|
|
ship = ship "\n" fish
|
||
|
|
}
|
||
|
|
close(command)
|
||
|
|
return ship
|
||
|
|
}
|