Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #BR2_ROOTFS_OVERLAY := $(BR2_ROOTFS_OVERLAY) $(BR2_EXTERNAL_NETBOX_PATH)/jocke | |
| LINUX_OVERRIDE_SRCDIR = /home/jocke/src/linux | |
| #IPROUTE2_OVERRIDE_SRCDIR = /home/jocke/src/iproute2 | |
| #MDIO_TOOLS_OVERRIDE_SRCDIR = /home/jocke/src/github.com/jocke/mdio-tools | |
| #MDIO_TOOLS_AUTORECONF = YES | |
| #PLY_OVERRIDE_SRCDIR = /home/jocke/src/github.com/jocke/ply | |
| #PLY_AUTORECONF = YES | |
| #TCPDUMP_OVERRIDE_SRCDIR = /home/jocke/src/github.com/the-tcpdump-group/tcpdump | |
| #LIBPCAP_OVERRIDE_SRCDIR = /home/jocke/src/github.com/the-tcpdump-group/libpcap |
| Marvell>> printenv | |
| baudrate=115200 | |
| bootargs=console=ttyS0,115200 root=/dev/nfs rw ip=0.0.0.0:0.0.0.0:10.4.50.254:255.255.255.0:marvell:eth0:none nfsroot=0.0.0.0:/srv/nfs/ | |
| bootcmd=run get_env; run get_images; run set_bootargs; booti $kernel_addr $ramfs_addr $fdt_addr | |
| bootdelay=2 | |
| console=console=ttyS0,115200 | |
| eth1addr=00:51:82:11:22:01 | |
| eth2addr=00:51:82:11:22:02 | |
| eth3addr=00:51:82:11:22:03 | |
| ethact=mvpp2-0 |
| #!/bin/sh -x | |
| # Sets up a complete network world inside a network namespace | |
| ns=world | |
| ip netns add $ns | |
| for i in 1 2 3 4; do | |
| ip netns exec $ns ip link add eth$i type veth peer p$i | |
| done |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:
#!/usr/bin/expect
| /* Read kernel IPv4 routes from main routing table | |
| * | |
| * Copyright (c) 2021 Joachim Wiberg <troglobit@gmail.com> | |
| * | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| # ~/.config/gtk-3.0/settings.ini | |
| [Settings] | |
| gtk-icon-theme-name = Adwaita-dark | |
| gtk-theme-name = Adwaita-dark | |
| gtk-font-name = DejaVu Sans 11 |
| -- Copy from /etc/xdg/awesome/rc.lua to .config/awesome/rc.lua | |
| -- | |
| -- My additions | |
| local r = require("runonce") | |
| ... | |
| -beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") | |
| +beautiful.init(gears.filesystem.get_themes_dir() .. "zenburn/theme.lua") | |
| ... | |
| - }, properties = { titlebars_enabled = true } |
| -- @author Peter J. Kranz (Absurd-Mind, peter@myref.net) | |
| -- Any questions, criticism or praise just drop me an email | |
| local awful = require("awful") | |
| local M = {} | |
| -- get the current Pid of awesome | |
| local function getCurrentPid() | |
| -- get awesome pid from pgrep |
| Xft.antialias: true | |
| !xterm.termName: xterm-256color | |
| xterm*metaSendsEscape: true | |
| xterm*scrollBar: false | |
| xterm*scrollbar.width: 8 | |
| xterm*reverseVideo: on | |
| xterm*renderFont: default |