LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2005, 01:23 AM   #1
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
Help writing a script


script1: Command: $./script1 a b c (or $ bash script1 a b c)
#!/bin/sh output:
for i in $* output:
do output:
echo $#$1 output:
shift output:
done
 
Old 12-24-2005, 02:54 AM   #2
DarkElf109
Member
 
Registered: Dec 2005
Location: Phoenix, AZ
Distribution: Ubuntu, Debian, Gentoo
Posts: 43

Rep: Reputation: 15
Mind telling us what you'd like the script to do?
 
Old 12-24-2005, 03:19 AM   #3
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
output for scripts

I need to know how I can find the result or output when executing the following:

#!/bin/sh
for i in $*
do
echo $#$1
shift

Last edited by mral; 12-24-2005 at 03:22 AM.
 
Old 12-24-2005, 10:06 AM   #4
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
You want to have a look at this Bash Scripting Tutorialand maybe at the link included in my sig.
 
Old 12-29-2005, 01:34 AM   #5
mral
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the info.
 
  


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
writing a script mjl3434 Linux - Newbie 7 12-13-2005 12:40 AM
help with writing a script jedimastermopar Linux - General 10 05-02-2005 02:34 PM
Need help writing a mp3->wav script... Vincent_Vega Linux - General 7 12-30-2004 12:10 AM
Help Writing a script. teeth44 Programming 2 10-14-2003 01:00 PM
writing a Script spanky5125 Linux - Security 5 01-08-2002 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:09 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration