Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ multixterm
- max_processes=20
- for ((i=0; i<$max_processes; i++))
- do
- /path/to/myprog arg1 arg2 > /tmp/myprog.${i}.log &
- done
- vi ~/.screenrc
- screen -t inst1 1 /path/to/myprog arg1 arg2
- screen -t inst2 2 /path/to/myprog arg1 arg2
- screen -t inst3 3 /path/to/myprog arg1 arg2
- screen -t inst4 4 /path/to/myprog arg1 arg2
- :setw synchronize-panes on
- #!/bin/bash
- prog="/path/to/myprog"
- args="argument1 argument2"
- max=100
- for i in $(seq $max); do
- if [ $i -lt $max ]; then
- exec $prog $args &> /dev/null &
- else
- exec $prog $args
- fi
- done
- #!/bin/bash
- checkfile() {
- if [ ! -f $1 ]; then
- echo "could not find $1"
- exit 99
- else
- echo "OK"
- fi
- }
- # Check for App1 XML
- echo -n "Checking for App 1 XML... "
- XMLA=/domain/DM.xml
- checkfile ${DEVROOT}/${XMLA}
- # Check for App2 XML
- echo -n "Checking for App 2 XML... "
- hostname=$(hostname)
- XMLB=/domain/DM_${hostname}.xml
- checkfile ${DEVROOT}/${XMLB}
- # Launch Konsole
- echo -n "Launching konsole... "
- K=$(dcopstart konsole-script)
- [ -z "${K}" ] && exit 98
- # Create second tab and resize
- SDA=$(dcop $k konsole currentSession)
- SDB=$(dcop $k konsole newSession)
- dcop $K $SDA setSize 121x25
- # Let bash login, etc.
- sleep 1
- # Rename the tabs
- dcop $K $SDA renameSession "App 1"
- dcop $K $SDB renameSession "App 2"
- # Start services, letting user watch
- echo -n "starting app1... "
- dcop $K konsole activateSession $SDA
- dcop $K $SDA sendSession "echo -ne '