Andries filmer

Feel free with Open Source Software

Andries Filmer - Internet professional sinds 1996.
Ik ben groot voorstander van Free- en Opensource Software (FOSS) en laat deze site jouw overtuigen waarom dit goed is.
Home Over deze website Kennisbank Ezelsoren Freelancer Online gereedschap

Bash Shell commandline - The power off shell

Index
  1. Web
  2. String operations
  3. File processing
  4. Images
  5. Links
  6. Comments

Sometimes I discover a command that is uncommon and very useful. Then I make a note on this page. Nothing special but mabye it's also new for you too. This page is a start to ask the man pages for more info.

Web

Serve current directory tree at http://$HOSTNAME:8000/
 python -m SimpleHTTPServer

String operations

This is a example how powerful stringoperations are.

 #!/bin/bash
 #
 # Get ipaddress from ipconfig
 
 x=`/sbin/ifconfig`
 y=${x#*inet addr:}
 y=${x#*eth0 *inet addr:}
 y=${y%% *}
 
 echo $y

Search google bash stringoperations.

File processing

If there are a large amount of files in a directorie you can't remove them, use a loop instead;

 for i in *; do rm $i;done

To cut off a range of characters in a file you can do:

 cut -b 1-2 --complement bazaar.txt

Images

A separate page for images

Links

This page is created on 2008-03-22 and updated on 2010-08-07

I appreciate if you give some comment about this page. Please go ahead.
Your e-mailaddress will not be published it is only to contact you (if needed).

 
Your name
Your e-mailaddress
To prefent robots to use this form I ask you kindly to type the next characters in the input field.
 

 


Mijn Curriculum vitae | De content op deze website heeft de Creativecommons 3.0 licentie | © 2011
Andries Filmer | http://andries.filmer.nl | andries@filmer.nl | © 2011
Deze website wordt gerealiseerd met Free- en Open Source Software: | | | | | |