|
This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
|
00:38
deadmarshal_ joined
02:25
MasterDuke left
02:31
rf left
04:04
Heptite left
06:49
teatime joined
06:52
teatwo left
09:04
discord-raku-bot left
09:05
discord-raku-bot joined
09:41
ab5tract joined
13:43
rf joined
13:44
jgaz joined
13:55
Heptite joined
18:49
teatwo joined
18:52
teatime left
|
|||
| nHail | my $iwctlproc = run 'iwctl station wlan0 show', :out; my $iwctlout = $iwctlproc.out.slurp: :close; say $iwctlout; I want a program that will get my current wifi network name. this should print the output of iwctl station wlan0 show, which contains the info I want, but instead it prints nothing. What might be wrong here? | 20:18 | |
| Nemokosch | there is no program called 'iwctl station wlan0 show' | 20:20 | |
| if you no what I mean | |||
| Nahita | probably need to send arguments to run separately | ||
| i'm not exactly sure why | |||
| Nemokosch | if you are going to hardcode the whole shell input, you might use the qx[] quoting | 20:21 | |
| which runs a shell and returns the output | |||
| nHail | Huh. yeah that did work | ||
| interesting | |||
| thanks | |||
| Nemokosch | run executes a program without invoking a complete shell, shell invokes a complete shell, and so does qx// but it fetches the output, much like $() or the backticks would in Shell | 20:22 | |
| this also means the latter two take like a line of shell, while the former takes a list of arguments, starting with the program to execute | 20:23 | ||
| nHail | Oh well you can just use run with the full command in <>, that's convenient | 20:29 | |
|
20:50
rf left
22:57
jgaz left
|
|||