View Single Post
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#1
despite its shortcomings I bought the n900 really only to learn shell scripting and perl. I have 0 programming experience and am 44.

well I made pearl say 'hello world' and I wrote this in bash...(was too lazy to fill in all the values in the album file)

yea I know this is a joke to real programmers, but to me...how cool to write my first script on my friggin phone. when I typed "galy year" and it spit out the values 1979 1980 1981 1982 1983, I said to myself...perhaps I can really learn bash. like on a train or waiting on the line at the supermarket.

long live easy debian and thank to all who ported it.
long live the n900.

[root@deb-m5v3d:~/scripts]cat galy
### enter (group album label year) to view that column from the albums file ###

#!/bin/bash
convert=

case $1 in
group) convert=$(echo 1) ;;
album) convert=$(echo 2) ;;
label) convert=$(echo 3) ;;
year) convert=$(echo 4) ;;
*) echo "please input group, album, label, or year." ; exit 1 ;;
esac

cut -f$(echo $convert) -d\| albums



[root@deb-m5v3d:~/scripts]cat albums
van halen|album named|record label|1979
ufo|album named|record label|1980
thin lizzy|album named|record label|1981
the doors|album named|record label|1982
al stewart|album named|record label|1983
 

The Following 16 Users Say Thank You to extendedping For This Useful Post: