Active Topics

 


Reply
Thread Tools
Bartcore3's Avatar
Posts: 118 | Thanked: 36 times | Joined on Feb 2011 @ Belgium
#11
so you should always start with this?
Like saying to your N900, here comes a shell script
K thanks
 
kingoddball's Avatar
Posts: 1,187 | Thanked: 816 times | Joined on Apr 2010 @ Australia
#12
I belibe so.
To start the script on Linux/N900 terminal:
Code:
 ./scriptname or if it fails . ./scriptname
After you make your script you will need to change the chmod

Type chmod 755 yourscriptname
Ch chmod +x scriptname

A simple script

#!/bin/sh
echo "hello. This is pretty cool"


That's it.
__________________
The thanks button? Sure! You can press it! I would!
 

The Following User Says Thank You to kingoddball For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#13
Originally Posted by Bartcore3 View Post
what does this mean?
Code:
#!/bin/sh
i'm planning to learn all this when i finish my exams ^^
From your avatar, I cannot tell if you are trollin' or not...

The line essentially tells the computer which interpreter to run the script in.

In the above example you are telling the computer to use the interpreter which is called 'sh'. sh is the 'shell'.

you could say:

Code:
#!/bin/bash
That would mean run this script IN bash. You could say:

Code:
#!/bin/python
That would mean run this script IN python.


Kingoddball:

My signature is a hilarious joke that apparently makes you a total bastard when you tell it.

My signature is a script that randomly chooses a number between 6 and 0, if you get a 0 it runs another script called a 'fork bomb' that crashes your computer. If you get between 1-6 it prints 'you live' and does nothing. It is computer russian roulette.

It used to delete everything on your computer if you got 0 but a bunch of people started crying about how mean that is so I changed it at Jedi's suggestion.


PS, dont run my signature
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.

Last edited by vi_; 2011-05-29 at 11:01.
 
Bartcore3's Avatar
Posts: 118 | Thanked: 36 times | Joined on Feb 2011 @ Belgium
#14
Originally Posted by vi_ View Post
From your avatar, I cannot tell if you are trollin' or not...
i can assure you that i'm not a troll, i just like the IE trollface
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:22.