Enable shell
Enable shell linux router(config)#shell processing full
show shell environment
router#sh shell environment # Environment Variables: # User Environment Variables: ?=1 # Global Environment Variables: # Builtin Environment Variables: PATH=CLI%Userfunctions%Builtins%SYSTEM # Environment Functions: # User Environment Functions: # Global Environment Functions: # Builtin Environment Functions: Function namespace: DEFAULT (( evaluate a numeric test expression Function namespace: DEFAULT [[ evaluate a logical test expression Function namespace: DEFAULT cat output data from a pipe or file to the terminal Function namespace: DEFAULT cut edit piped output Function namespace: DEFAULT echo echo arguments to the terminal Function namespace: DEFAULT false return false in while or if expressions, and set the result Function namespace: DEFAULT fetch return values from the configuration database Function namespace: DEFAULT grep search for regular expressions in piped output or files Function namespace: DEFAULT head print the first lines in the input Function namespace: DEFAULT interface print interfaces that match the argument Function namespace: DEFAULT let evaluate a numeric expression, and set the result Function namespace: DEFAULT man print information for builtins Function namespace: DEFAULT more page piped output to the terminal Function namespace: DEFAULT nl number the lines in the input Function namespace: DEFAULT null ignore the input Function namespace: DEFAULT printf output formatted data to the terminal Function namespace: DEFAULT read read input into variables Function namespace: DEFAULT set_oper set operational values Function namespace: DEFAULT sleep pause execution of the terminal Function namespace: DEFAULT sort sort the input Function namespace: DEFAULT tail print the tail of the input Function namespace: DEFAULT true return true in while or if expressions, and set the result Function namespace: DEFAULT uname print system information Function namespace: DEFAULT wc count lines, words, and chars
Example
router#sh int desc | grep up Et0/0 up up Et0/1 up up Lo0 up up NV0 up up Tu0 up up router#sh int desc | grep up | wc -l 4