Try the following Gostscript one-liner:
$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=combined.pdf article1.pdf article2.pdf notes.pdf
Try the following Gostscript one-liner:
$ gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=combined.pdf article1.pdf article2.pdf notes.pdf
Typo3update is designed to directly update content to a Typo3 website from the command line. It works as a network service and can be used from any machine that can connect to the server running the Typo3 website. For example, quota overviews and cluster news information that is available from command line programs or text files can be updated to Typo3 using simple bash scripts. Typo3update takes the actual content from standard input. Additionally, it requies two command line options: uid and the header.
Have a look at the following example:
$ cat textfile | typo3update 9533 "About"
This will insert the contents of textfile into content element 9533 that has the heading “About”. The heading parameter is to double check the content element id. If the id doesn’t match the supplied heading, typo3update refuses to update (overwrite) the content. Instead, it writes a line to an error log file.
The content element should be created first from the Typo3 backend. To identify the uid of the content element in a certain page, just hover your mouse pointer above the content element icon. The uid will show up in a tool-tip:

(more…)
Redirect stdout to stderr:
$ echo Oops, something went wrong >&2
Redirect stderr to /dev/null:
$ ls /home /qwerty 2> /dev/null
home:joe john
To get rid off all output:
$ ls /home /qwerty >/dev/null 2>/dev/null
# or
$ ls /home /qwerty >/dev/null 2>&1
Just a very short note. It’s not so difficult, but I keep on forgetting the syntax. Here it is:
me@localhost$ tar cf - . | \
ssh user@otherhost 'cd dir; tar xf -'
Answer: Try units. This is an example of a terminal session using units:
$ units
2084 units, 71 prefixes, 32 nonlinear units
You have: 2 inch
You want: mm
* 50.8
/ 0.019685039
You have:
Type help for some help, press ^D to quit units.
Example of usage in a shell script:
# determine installed RAM
kbram=`cat /proc/meminfo | awk '/MemTotal/ { print $2 }'`
gbram=`units "${kbram} kilobytes" 'gigabytes' |sed --silent -e '1p' | awk '{print $2}'`
echo This computer has $gbram Gb of RAM installed!
More info: www.gnu.org/software/units/manual/units.html
Related nerd note: Eenheden toevoegen aan de ‘Unit Converter’ widget.
Today, I wrote a little bash scripts that scans the network for computers that are not registered in DNS. Reverse DNS to be more precise. It uses nmap to do a reverse DNS lookup for each computer it pings:
$ nmap -sPR -oG - 192.168.0.*
The result is filtered for failed DNS lookups:
$ nmap -sPR -oG - 192.168.0.* | grep "()"
Since all computers are contacted their mac address is known in the ARP (Address Resolution Protocol) table:
$ /sbin/arp | grep -w 192.168.0.35 | awk '{ print $3 }'
After looking up the MAC address, a table is presented with ip addresses and their mac addresses. This is the complete script.
I just got my E-Tech Wireless USB Adapter working under Ubuntu. These where the steps:
[4302473.979000] usb 1-2: new full speed USB device using uhci_hcd and address 4[4302474.383000] usb 1-2: Failed to load zd1201.fw firmware file!
[4302474.383000] usb 1-2: Make sure the hotplug firmware loader is installed.
[4302474.383000] usb 1-2: Goto http://linux-lc100020.sourceforge.net for more info
~/src$ tar xzvf zd1201-0.14-fw.tar.gz
zd1201-0.14-fw/
zd1201-0.14-fw/zd1201.fw
zd1201-0.14-fw/README
zd1201-0.14-fw/makefile
zd1201-0.14-fw/zd1201-ap.fw
Run ’sudo make install’ in the zd1201-0.14-fw directory. This returned the following error message:
~/src/zd1201-0.14-fw$ sudo make install
INSTALL zd1201.fw zd1201-ap.fw
Failed: No firmware directory found
make: *** [install] Error 1
~/src/zd1201-0.14-fw$ sudo cp *fw /lib/firmware/`uname -r`
[4303176.729000] usb 1-2: new full speed USB device using uhci_hcd and address 5[4303177.421000] usb 1-2: wlan0: ZD1201 USB Wireless interface
[4303188.374000] wlan0: no IPv6 routers present
