ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [mdk-re] ~/bin: тройные раскладки к xkb, прозрачные логи
@ 2001-12-01 19:03 Michael Shigorin
  0 siblings, 0 replies; only message in thread
From: Michael Shigorin @ 2001-12-01 19:03 UTC (permalink / raw)
  To: ALT Linux


[-- Attachment #1.1: Type: text/plain, Size: 719 bytes --]

	Здравствуйте.
В процессе разгребания ~/bin обнаружил :)) скриптик, по-быстрому
сляпанный для сведения двух раскладок XKB в одну "тройную".

Если кому поможет -- и то хорошо, иначе sorry for traffic.

PS: после в vim обработал чем-то вроде (тут табы, осторожно c
cut'n'paste):
s@^\(.*\[		\)\([^ 	]*\),.*\([0-9]\).*\(\].*\)$@\1\3,	\2	\4@g

PPS: в довесок -- вот такие aterm'ы занимаются десктопом "Logs" в
моем WindowMaker...

/usr/bin/aterm -tr +sb -rv -geometry 121x62+64+64 -fn 8x13 -cr blue -pr blue -name aterm-notitle -e sudo tailf /var/log/messages 
(в sudoers я себе разрешил выполнять именно это sudo без пароля)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ http://visa.chem.univ.kiev.ua/~mike/

[-- Attachment #1.2: merge-xkb-maps.sh --]
[-- Type: text/plain, Size: 728 bytes --]

#!/bin/bash2
# a one-timer script to help me merge two XKB symbols files.
# After half-doing it by hand and killing an xterm...

TO=ru
FROM=ru-koi-3gr
OUT=ru+ua

echo -n >TMP
echo -n >TMP1
echo -n >TMP2
echo -n >TMP3

grep '[[:cntrl:]]\[' $TO >$TO.tmp
grep '[[:cntrl:]]\[' $FROM >$FROM.tmp

IFS=$'\n'
FLAG=1
cat <$FROM.tmp | while read STR; do	# only thirds
	case $FLAG in
		1) echo $STR >> Tmp;FLAG=2;;
		2) FLAG=3;;
		3) echo "$STR" >TMP;
		   sed -e 's/^\(.*\]\).*$/\1,/' >>TMP2 <TMP;
		   FLAG=1;;
	esac
done

FLAG=1
cat <$TO.tmp | while read STR; do	# split line-by-line
	case $FLAG in
		1) echo "$STR" >>TMP1; FLAG=2;;
		2) echo "$STR" >>TMP3; FLAG=1;;
	esac
done

paste -d$'\n' TMP1 TMP2 TMP3 | sed 's/^\[/			\[/' >$OUT


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-12-01 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-01 19:03 [mdk-re] ~/bin: тройные раскладки к xkb, прозрачные логи Michael Shigorin

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git