English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

is there any one that can help me find some basic info about writting shells with linux or like step by step kinda thing

thanx

2007-09-18 09:46:15 · 2 answers · asked by josue 2 in Computers & Internet Programming & Design

2 answers

look shell scripting in unix or linux is just writing your commands in a file and saving it with a ksh or .sh or .csh extension depending on what shell you are using.if you are already using some basic commands in linux like ls ,who,whoami,grep,cat you can write a very basic shell script .eg :

## This is a example shell script
ls
echo " I just printed out the contents of the directory"
echo "My user name is "
whoami


some basic sites for shell scripting are :

http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/unixscripting/unixscripting.html


http://www.panix.com/~elflord/unix/bash-tute.html

a very good forum to ask your doubts is www.unix.com

happy learning

2007-09-18 10:29:17 · answer #1 · answered by life goes on... 2 · 0 0

Hopefully you mean shell scripts. Not actually writing a full shell like BASH or KSH.

And if you are in a gui interface like Gnome or kde then the answer gets pretty complicated.

If you are doing text commands, then any commands you can do at the prompt can be included in a script. You just use any editor and create a text file with the commands. Then make the text file executable.


(taken from the link below)
How to write a script:
- create file which contains in first line:
#!/bin/bash
- place shell commands in file
- run to make it executable
- run shell script like this: ./my_shell_script
- when you place it into /usr/local/bin you only type its name from any user account

2007-09-18 17:41:00 · answer #2 · answered by Gandalf Parker 7 · 0 0

fedest.com, questions and answers