Tuesday, June 24, 2008
bits and stuff
Some bits I always seem to forget.
Splitting a delimited line of text in bash
line = a|b
first=${line%|*}
second=${line#*|}
echo $first
echo $second
Post in curl (OS X)
curl --data-ascii "var1=one&var2=two" http://server.com/myapp
Subscribe to:
Posts (Atom)