Reply
Thread Tools
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:
jd4200's Avatar
Posts: 451 | Thanked: 424 times | Joined on Apr 2010 @ England
#2
You just gave me a warm fuzzy feeling inside; I'm glad you like it and keep up the learning.

I bought the device for the same reasons: wanting to extend my bash knowledge and learn python.
 
Posts: 163 | Thanked: 21 times | Joined on Feb 2010 @ London UK
#3
If you want to learn it install it on the PC... if you want to make phone apps get a nexus one with its simple build program and a deivce that has a battery that lasts longer than 10 minutes and an OS that actually works.
 
Posts: 145 | Thanked: 25 times | Joined on Jan 2010
#4
im not fond of writing shell scripts (i use my pc with an SSH for that, ever so rarely)..

it would be great if we had a mini GCC or C++ compiler for the n900 so we can create even little console programs.
 
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#5
Originally Posted by altorn View Post
it would be great if we had a mini GCC or C++ compiler for the n900 so we can create even little console programs.
What is it that you want to do in C or C++ on an n900 that could not be done easily or well in perl or python?
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.
 
ArchiMark's Avatar
Posts: 414 | Thanked: 109 times | Joined on Mar 2007 @ Silicon Valley
#6
Congratz, extendedping!

I know the good feeling that comes from such a first step...

FWIW, I had similar thoughts and have started teaching myself python...bought several books and reading through them as much as I can...

There are also quite a few online resources as well...

Have fun!
__________________
Mark
Silicon Valley Digerati

Nokia N900
Previous: Nokia N810 & N800
 
Posts: 838 | Thanked: 292 times | Joined on Apr 2010
#7
yes I don't know if I should be looking at perl or python. I am not trying to be a developer I am trying to be an administrator and its seems (from what little I know) that perl is used more by admins and python by people building apps. Am I wrong in my thinking?
 
Posts: 670 | Thanked: 367 times | Joined on Mar 2009
#8
I would recommend python.
__________________
* n810 since Feb 2009
* Most-used apps: Opera, gPodder, Panucci, Tomiku, Canola, Quasar, MaemoMapper, ATI85, Maemopad+, AisleRiot Solitaire, Anagramarama, Rapier, Gnumeric, pyRDesktop
* Mobile-friendly URLs of popular sites
 

The Following User Says Thank You to buurmas For This Useful Post:
Posts: 61 | Thanked: 63 times | Joined on Apr 2010
#9
I second buurmas, python is far easier to work with with all the API's. I program a lot on PHP as well on the web, but I am trying my hands on Python for the N900, just wrote a small script to block calls
 

The Following User Says Thank You to Power For This Useful Post:
Ken-Young's Avatar
Posts: 387 | Thanked: 1,700 times | Joined on Feb 2010 @ Cambridge, MA, USA
#10
Python's the way to go. It's filling the niche BASIC did 30 years ago. It's extremely easy to get started with, but you won't have wasted your time learning it if you want to do something more ambitious down the road.
 

The Following User Says Thank You to Ken-Young For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 03:59.