Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th July 2006, 17:04
selvam selvam is offline
Junior Member
 
Join Date: Jul 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default shell script problem (urgent)

hi,

if any one give me a code for this output


if i give input 4 means

i want this output


*
* *
* * *
* * * *

actually i am not familier with for loop in shell script .

so that i ask this help to u

send your answer as soon as possible

thanks
Reply With Quote
  #2  
Old 26th July 2006, 11:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
Default

Have a look here: http://www.tldp.org/LDP/abs/html/index.html
It should get you started.
__________________
Falko
--
Follow me on:
Reply With Quote
  #3  
Old 27th July 2006, 18:47
KenJackson KenJackson is offline
Junior Member
 
Join Date: Jul 2006
Location: Maryland, USA
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I implemented this just for fun. But this sounds so much like a homework assignment that I'm only posting a few lines (the looping part) of my solution.
Code:
#!/bin/sh
...
while [ $n -gt 0 ]; do
    ...
    n=$[n-1]
done
Don't forget to make the file executable with 'chmod +x scriptfile'.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 13:20
URGENT Web_ problem itgroup Installation/Configuration 11 12th August 2006 18:23
Shell Script Need Help mphayesuk Programming/Scripts 4 27th June 2006 13:06
shell script Nnyan Programming/Scripts 4 24th June 2006 14:47
Apache and Tomcat problem! Urgent maroonworks Server Operation 3 24th February 2006 16:14


All times are GMT +2. The time now is 10:20.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th