Native Shell Programs

Nu allows you to access native shell programs by escaping the program name with ^.

sc is a Windows CMD program that is used for communicating with the Service Control Manager

  1. > ^sc queryex eventlog | lines | str trim | parse "{key}: {value}"

Output

  1. ───┬────────────────────┬────────────
  2. # │ key │ value
  3. ───┼────────────────────┼────────────
  4. 0 SERVICE_NAME eventlog
  5. 1 TYPE 30 WIN32
  6. 2 STATE 4 RUNNING
  7. 3 WIN32_EXIT_CODE 0 (0x0)
  8. 4 SERVICE_EXIT_CODE 0 (0x0)
  9. 5 CHECKPOINT 0x0
  10. 6 WAIT_HINT 0x0
  11. 7 PID 3452
  12. ───┴────────────────────┴────────────