Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/bin/bash | |
CURRENT_STATE=`amixer -c 1 get Master | egrep 'Playback.*?\[o' | egrep -o '\[o.+\]'` | |
if [[ $CURRENT_STATE == '[on]' ]]; then | |
amixer -c 1 set Master mute | |
else | |
amixer -c 1 set Master unmute | |
amixer -c 1 set Speaker unmute | |
amixer -c 1 set Headphone unmute |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// initialize the tape with 30,000 zeroes | |
unsigned char tape[30000] = {0}; | |
// set the pointer to point at the left-most cell of the tape | |
unsigned char* ptr = tape; |