LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-16-2011, 03:55 PM   #1
timdvtemp
Member
 
Registered: Feb 2011
Distribution: Redhat/Fedora
Posts: 39

Rep: Reputation: 3
Problem Running Bash Script in new Screen..


Hi All,
I have a bash script that I want to be running on a "clean" screen, but when the script finishes/exits I want to see what was previously on the screen. Any thoughts? The "Clear" command does not enable me to get the information back, and the "Screen" Command runs the program in the original window, so you see nothing until the new screen is exited.
Thanks!
 
Old 02-16-2011, 04:04 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Can you explain in more detail what you are trying to do? Your explanation is too vague.
 
Old 02-16-2011, 04:50 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You want your script to be executed without messing up the existing text console? How about
Code:
xterm -e yourShellScript
which will launch the script in a new terminal, leaving your existing terminal intact. Requires X, but xterm is pretty ubiquitous.

--- rod.
 
Old 02-17-2011, 05:30 AM   #4
timdvtemp
Member
 
Registered: Feb 2011
Distribution: Redhat/Fedora
Posts: 39

Original Poster
Rep: Reputation: 3
Sorry...
I wrote a find and replace Bash shell, basically to find and replace strings in files. When I execute the program, I want to see ONLY my script in the terminal. no [xxx@xxx~]$, no nothing. Whitespace except whatever my programs outputs are. When the program closes, I wish to see what was previously on the screen.
 
Old 02-17-2011, 07:41 AM   #5
timdvtemp
Member
 
Registered: Feb 2011
Distribution: Redhat/Fedora
Posts: 39

Original Poster
Rep: Reputation: 3
sorry rod, didn't see you post..works great, thanks!
 
  


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
Making sure script is running in bash! kalleanka Programming 11 02-16-2011 02:08 AM
[SOLVED] How to make a bash script keep running in same terminal after it calls second script? JohnRock Linux - Newbie 4 06-25-2010 09:16 AM
Running Bash script in PHP script SteveMack2015 Linux - Software 2 05-14-2010 03:34 PM
running su from a bash script caminoix Programming 7 12-28-2005 03:41 PM
Bash Script: Problem running variable command containing "" Paasan Programming 2 01-21-2004 01:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:22 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