Method to display a line at the top always, regardless of stdout


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Method to display a line at the top always, regardless of stdout
# 1  
Old 03-27-2012
Method to display a line at the top always, regardless of stdout

Hi

Is there way to, say, echo a line and make sure it is always displayed on the first line, no matter what is coming out on stdout?

eg:

Code:
#!/bin/bash
clear
echo " ...... Internal audit script ......"
tar xvf hugefile.tar

I'd like to have the " Internal audit script " line to be shown always on the top row, even as the screen scrolls with the output of tar extraction.

Thanks
# 2  
Old 03-27-2012
Code:
echo -e "\e[1;1H ...... Internal audit script ......"
tar xvf hugefile.tar

# 3  
Old 03-27-2012
Thanks, this will echo to first line, but it doesnt stay there when the screen starts scrolling with the output from tar.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to display only the first 5 running process using top in shell scripting?

topfunc() { top } topfunc Here i used the top command inside a function,and i called the function. when executing this bash file i get all the process which are using by the kernel i just want to display only the first 5 running process. is it possible? (7 Replies)
Discussion started by: Meeran Rizvi
7 Replies

2. UNIX for Dummies Questions & Answers

Display Directory path on top

Hello, I am using below in my .bashrc to dynamically display user/host/directory information whenever i logged in to my Red hat Linux 64bit OS, BASH shell. export PS1='$PWD>' output: /dbms/app/oracle/product/11.2.0/dbhome_1> But i want to display absolute path information to be displayed... (1 Reply)
Discussion started by: Ariean
1 Replies

3. Shell Programming and Scripting

STDOUT in one line

Hi all, I got a file which contains this. aaaaaaaaaaaaaaaaaaaaaaaa test aaaaaaaaaaaaaa test aaaaaaaaaaa test aaaaaaaaaaaaaaaaa test aaaaaaaaaaaaaaaaaaaaa test aaaaaaaaa test aaaaa test and I want all test output in one row, ideally 3 spaces after the longest word. Thanks (4 Replies)
Discussion started by: stinkefisch
4 Replies

4. UNIX for Dummies Questions & Answers

replace stdout line in loop

Hi, as part of a script i have a loop that goes though a set of files. This loop can take some time, so i'd like to show the user that something is happening by showing them the filename being worked on. I could create a long list of file names in the terminal using echo or print... (0 Replies)
Discussion started by: nickrick
0 Replies

5. Shell Programming and Scripting

Display top ten directories by size

Hi, I am new to Unix. I want to display top 10 folders by size. I tried with du -ksl * | sort -nr | head -10 command .But I am getting the following error -bash: /usr/bin/du: Argument list too long Can some one help me. Thanks. (5 Replies)
Discussion started by: Satyak
5 Replies

6. Shell Programming and Scripting

Shell script to display top 5 process (per cpu consumption)

Hello, I have to create shell script being myself real novice in scripting... I was looking on the Internet for some script examples, but I don't have the basic understanding of the shell. I was trying to do something with “ps” command without success. For exemple total number of... (2 Replies)
Discussion started by: mr_awd
2 Replies

7. Shell Programming and Scripting

Display most top 10 occurring words along with number of ocurences of word inthe text

I need Display the most top 10 occurring words along with the number of occurences of those words in the given text. Sample text as below: "The Travails of Single South Indian men of conservative upbringing" or "Why we don't get any..." Yet another action packed weekend in Mumbai, full of... (2 Replies)
Discussion started by: smacherla
2 Replies

8. UNIX for Dummies Questions & Answers

redirect stderr and/or stdout to /dev/null from command line

Is it possible to redirect errors at the command line when you run the script such as bash scriptname & 2>/dev/null? (1 Reply)
Discussion started by: knc9233
1 Replies

9. Solaris

Top and Prstat display different results for memory

I have a question about the accuracy of prstat. I did a 'prstat -t' and it shows 99% of my memory is occupied by oracle. NPROC USERNAME SIZE RSS MEMORY TIME CPU 194 oracle 343G 340G 99% 86:17.24 56% However, 'top' shows I still have 7762meg of memory free. Memory: 16G real, 7762M... (4 Replies)
Discussion started by: zen03
4 Replies

10. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies
Login or Register to Ask a Question