logIt Log Around The Clock

Posts Tagged ‘shell script’

Raspberry Pi: Membrane (Matrix) Keypad as GPIO Input

Membrane matrix keypad using GPIO as Raspberry Pi input has been my goal since WiringPi deployed in the first place. To begin with, GPIO hacking was initially started with some important basics (see previous post). Without external system (other interfacing chip), the 3×4 membrane keypad reserved all seven GPIO pins plus one pin used for [...]

Alas my LinkedIn password is in the file! (Howto check compromised password)

When LinkedIn privacy breach was about to be revealed during Yuval Ne’eman workshop in Tel Aviv University, suddenly the timeline trends were that of friends, telling people to change LinkedIn password. Both were separate issues and of course the privacy breach was then subsided from people’s attention. To tell you the truth, as a secret [...]

Function Return Value ?

tags:

The following function: 1 2 3 processLine(){ <strong>line</strong>="$@" } Does it have some sort of “return value”? (in this case the variable line) by calling it through: processLine $line echo $line In the above example, I echo the value of line after being processed by processLine(). (?)

Startup script for TAP interfaces

To add startup script we can use: System > Preferences > Sessions local boot script (as services start/stop in /etc/init.d/) I added the following shell script: setup-tap: #! /bin/bash tap_up() { tunctl -t tap0 -u $USER tunctl -t tap1 -u $USER ifconfig tap0 192.168.20.1 ifconfig tap1 192.168.40.1 #iptables -t nat -A POSTROUTING -o eth1 -j [...]