Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1016 Bytes

native_shell_programs.md

File metadata and controls

30 lines (24 loc) · 1016 Bytes
title
Native Shell Programs

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

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

Output

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