Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-20-2003, 06:04 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
hello people ,I am a learner about shell scripts ,I find it very hard to learn .

I don't know if you can give a advise to teach me to study Shell Scripts .Thank you !
if you can tell a good web site about shell script learning ,I will be appriciation of you !
Old 07-20-2003, 06:58 AM   #2
Registered: Feb 2003
Location: London, UK
Distribution: Gentoo/Debian
Posts: 39

Rep: Reputation: 15
Here start with Bash scripting. There are like hundreds of howto's on the internet here's one:
Old 07-20-2003, 09:44 AM   #3
LQ Newbie
Registered: Jul 2003
Location: Kuala Lumpur,Malaysia.
Distribution: Red Hat 7.3
Posts: 16

Rep: Reputation: 0
It's rather easy than High-Level Programming Languages.

1) save this code
echo "Hello,Bash !"

2) type "chmod a+x " filename
3) run the filename
4)Just this simple
Old 07-20-2003, 11:04 AM   #4
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Shell scripts at their simplest are just a series of bash commands.
They need to have the #!/bin/bash line and be made executable as jackyopensrc mentions.
Try something simple like a script that mounts your floppy, lists the contents, then unmounts it. Next time you have 3 unlabeled floppies you can see what's on them with one command.
When you see how simple this is you just need some more ideas and a good reference.
Old 07-21-2003, 08:12 AM   #5
Registered: Apr 2003
Location: Stockholm/Sweden
Distribution: Kubuntu, Debian, Slax
Posts: 91

Rep: Reputation: 16
Shellscripting is often about extracting information from files and taking actions based on this, or changing text streams, or taking actions based on wether a particular command was successful or not.
Therefore you'll find it well worth to learn commands like sed, awk and grep.
The more commands you know and can use, the easier shellscripting will become.
Don't forget to use the apropos command if you're not sure what command you're looking for...

Also learn how to create loops, if statements and functions.
Arrays can be useful too, but I rarely use them in my scripts so I would give them a lower priority...
Old 07-21-2003, 12:30 PM   #6
Registered: Jul 2003
Location: Slovenia
Distribution: Slackware & FreeBSD
Posts: 209

Rep: Reputation: 30

before you go on reading Advanced Bash Scripting Guide, like MooktaKiNG suggested, you may try to take an easy intro with
BASH programming HOWTO ( or you can find it on your linux box), becouse abs advances quite fast and it could be a bit confusing for a newbie (well at least it was for me ).

Old 07-22-2003, 03:06 AM   #7
LQ Newbie
Registered: Jul 2003
Location: Kuala Lumpur,Malaysia.
Distribution: Red Hat 7.3
Posts: 16

Rep: Reputation: 0
Good day Everybody,

You can discover that Shell scripts can be very useful sometimes.


May I ask you some kind of questions,such as

1)What type of Documents you are refering...?
2)Which parts of it you found difficults?
3)Have you ever tried a simple program?

I think you'd better let us your situations.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why do people say Debian is hard? Or for Elitist DebianBlackBird Debian 25 12-31-2005 12:42 AM
How do people learn higher level programming? microsoft/linux Programming 13 09-25-2005 09:48 AM
Why *NIX is so hard to learn PTrenholme General 7 02-28-2005 11:50 AM
Want to learn Shell Scripting dawood Linux - General 3 08-04-2004 06:59 AM
Why do people piss and moan about linux being hard to install? versaulis Linux - Software 29 10-07-2003 04:45 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration