LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-15-2010, 03:37 PM   #1
cpski02
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
getting text in the terminal window


So I'm pretty new to this and have a problem that I can't seem to fix. I'm writting a BASH script for a solaris system and need to have text enter into a console window. I've got so far:

#!/bin/bash
xterm
echo "text goes here"

When I run it I get the terminal window but the text going into another window. Nothing that I've found on this site helps me so far. If this is the wrong board, I'm sorry but I figured I'm about as newbie as it gets.
 
Old 09-15-2010, 04:01 PM   #2
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
Welcome to the forum, cpski02

What you want to do is to have a script run in another terminal.

If you did xterm -e "text goes here", it would open up another terminal, echo the message, but then, alas, it would terminate immediately since it had done the job required.

Can you explain, what it is you want to achieve, since, given the information that you've given, you are trying to do something quite advanced, i.e., launch a terminal and then control it.

You do not have control over the terminal that you launch, but you are assuming that you do - that is wrong.

What you could try is, launch a terminal, get its "id" and then send a message to it.

But it would help if you explained to us what you are trying to achieve.

Last edited by harryhaller; 09-15-2010 at 04:04 PM.
 
Old 09-15-2010, 10:11 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,382
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
Machteld Garrells's guide to BASH scripting is the best I've seen.
 
1 members found this post helpful.
  


Reply



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
copying text from terminal BASH window to a webpage. mdlinuxwolf Linux - Newbie 4 10-30-2009 07:13 PM
Can't get back to the text terminal after exiting from any window manager dissociative Slackware 7 07-25-2007 10:40 PM
Colored Text in Terminal Window griffey Red Hat 3 04-30-2007 12:40 PM
Can't type text in terminal window kingtas Linux - Newbie 2 01-21-2005 02:41 PM
Terminal Window with no text pawlub Linux - Software 2 03-31-2004 03:19 PM

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

All times are GMT -5. The time now is 08:03 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
Open Source Consulting | Domain Registration