LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 10-14-2003, 10:49 AM   #1
teeth44
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Help Writing a script.


I am very new to linux. Does anyone know how to write a script which prints
the numbers 1-100 on the standard output using at least one numeric variiable
and increment that variable?
 
Old 10-14-2003, 11:05 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
One would normally do that with:
Code:
#!/bin/sh
seq 1 100
By incrementing a variable it could also be done.

But why? Because it is home-work?
 
Old 10-14-2003, 12:00 PM   #3
Nimoy
Member
 
Registered: Jun 2003
Location: Currently Denmark
Distribution: Ubuntu 11.10
Posts: 334

Rep: Reputation: 30
The following site is a great starter for Linux newbies http://www.start-linux.com

For examples on writing scripts see http://linux.dbw.org/shellscript_howto.html

I hope this will give you a good grasp of how to utilize the powers of the command line...
 
  


Reply


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
help with writing a script jedimastermopar Linux - General 10 05-02-2005 01:34 PM
help writing script willinusf Programming 7 07-20-2004 11:37 AM
Help writing a rm script VisionZ Linux - Newbie 17 03-24-2004 07:15 AM
Writing a Script Nyc0n Linux - General 2 05-27-2002 07:21 PM
writing a Script spanky5125 Linux - Security 5 01-08-2002 09:22 AM


All times are GMT -5. The time now is 07:31 AM.

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