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-06-2010, 11:27 AM   #1
josecolella
Member
 
Registered: Nov 2010
Location: Milan, Italy
Distribution: Linux Mint 13, Debian 6.0
Posts: 62

Rep: Reputation: 3
Question Having trouble with script in Ubuntu


I am trying to create a script that creates a vector and displays it. I used the command inivec but it didn't work.

#! /bin/bash
# Title: Vector
# Author: Jose Miguel Colella
# Description: Creating Vector
inivec MV 3 aa
done

How do I make it so the terminal executes mi script to create a vector. I know MV is the name and the output should be aa aa aa, but nothing.?
 
Old 12-06-2010, 11:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
You can't be getting ' nothing' from stunning it, a if nothing else, the 'done' line would be causing ash error as it's being used illegally. What are you doing to run this? What happens?
 
Old 12-06-2010, 05:53 PM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,499

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
What happens when you run the exact same input on the command line?
ie, try running:
Code:
inivec MV 3 aa; done
Then from the errors you receive there you can work until you get the right input.
Remember that a script simply automates something you would have done by hand on the command line, so if it doesn't work there then it will never work in the script.
 
Old 12-07-2010, 01:36 AM   #4
josecolella
Member
 
Registered: Nov 2010
Location: Milan, Italy
Distribution: Linux Mint 13, Debian 6.0
Posts: 62

Original Poster
Rep: Reputation: 3
I will try that thanks
 
  


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
Having trouble with cp command in my script. maprice Linux - General 1 03-18-2008 01:37 PM
Having trouble with a simple script Arcturuss Linux - Newbie 1 12-03-2007 01:10 AM
Trouble with script and bc Freestone Linux - General 4 10-11-2006 06:10 PM
Trouble with my first SlackBuild script Yalla-One Slackware 6 06-10-2006 02:03 PM


All times are GMT -5. The time now is 08:46 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration