Strange content on the screen

 
Thread Tools Search this Thread
Operating Systems Linux SuSE Strange content on the screen
# 1  
Old 04-21-2014
Strange content on the screen

When I execute below script I see a bunch of 'y' on the screen. I am wondering if the command is being executed. Is this normal and should I wait to finish?
Thanks,

Code:
 output over /var/opt/Teradata/bteqdba/TAREAS_DBA.log
 enable scriptmode
 scope vproc all
 showspace
 packdisk
 y
 showspace
 scandisk
 yes
 quit


#Screen.
Code:
y
y
y
y
y
y
y
y
y
y
y
y
y
y
y
y
y


Last edited by Scrutinizer; 04-21-2014 at 05:24 PM.. Reason: Removed confusing formatting
# 2  
Old 04-21-2014
This looks like a DB script of some sort. Is it run from a shell? What shell command is used? It looks like program/DB command initiations and "answers" to prompts which should have been run from a bash shell here document.

Can we have some more context?
# 3  
Old 04-21-2014
No. I didn't execute in Shell.

I just executed the script by typing './packdisk' on Linux prompt. Packdisk is a file name I executed. 'y' is a part of the script.

In running packdisk utility(Teradata utility) using Viewpoint(Teradata tool) it asks first 'Do you want to run Y/N?' and I type 'Y' and it starts to run.

Thank you,
# 4  
Old 04-22-2014
Okay, so you are running this at the shell prompt, so this is a shell script. I think you will find that the packdisk has exited because it has no input. The next line y will then be execute (no used as input to the previous) and that command probably is unknown. Your showspace and scandisk may give output or exit, but your last command is yes and this is a recognised command. It is the yes command that is giving you all the output. Have a look at man yes for how it works.

I must admit I'm unaware of the early command format too, such as output over .... I assume that you are wanting to define the output file and overwrite an existing one, but this is not a way I recognise.

Oddly you have the command enable which is normally associated with printers. Are you trying to run this as input to some other program? If so you might need to:-
Code:
some_other_prog <<-EOF > /tmp/logfile 2>&1
output over /var/opt/Teradata/bteqdba/TAREAS_DBA.log
enable scriptmode
scope vproc all
showspace
packdisk
y
showspace
scandisk
yes
quit
EOF

The section between the red highlights is used as input to the calling some_other_prog

Please show us what you get from the following keyed at the command line:-
Code:
whence output packdisk scope showspace
for file in location_of_each_item_found_above
do
   printf "\n$file:-\n"
   head $file
done

alias | egrep "output|packdisk|scope|showspace"

There's just not enough to go on just yet.


Regards,
Robin

Last edited by rbatte1; 04-22-2014 at 12:34 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Facing issues with Content-Type:application/x-download Content-Disposition:attachment

I am in the process of developing a perl cgi page. I had succeeded in developing the page but there are few errors/issues with the page. description about cgi page: My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies

2. Shell Programming and Scripting

Sed: replace content from file with the content from file

Hi, I am having trouble while using 'sed' with reading files. Please help. I have 3 files. File A, file B and file C. I want to find content of file B in file A and replace it by content in file C. Thanks a lot!! Here is a sample of my question. e.g. (file A: a.txt; file B: b.txt; file... (3 Replies)
Discussion started by: dirkaulo
3 Replies

3. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

I made a screen within a screen. Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
Discussion started by: phpchick
2 Replies

4. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

5. Shell Programming and Scripting

Help with remove duplicate content and only keep the first content detail

Input data_10 SSA data_2 TYUE data_3 PEOCV data_6 SSAT data_21 SSA data_19 TYUEC data_14 TYUE data_15 SSA data_32 PEOCV . . Desired Output data_10 SSA data_2 TYUE data_3 PEOCV data_6 SSAT data_19 TYUEC (9 Replies)
Discussion started by: patrick87
9 Replies

6. UNIX for Advanced & Expert Users

Strange tab-completion behavior with zsh in screen

I'm running Mac OS, using the latest version of zsh. I've noticed that I have funny tab-completion behavior when inside a screen session. Specifically, once I press tab, the first part of my command seems to be duplicated before the completion results are inserted. For example, if I type... (14 Replies)
Discussion started by: marshaul
14 Replies

7. Shell Programming and Scripting

sed, awk [TAG]$content[/TAG] How to get var in $content in textfile?

Hello, I got a Qstion. Im posting to a phpbb forum with bash and curl.. i have a text file with the following tags that i post to the forum: $var1 $var2 $var3 How can i with sed or awk put var content from shell script between the ... in the... (7 Replies)
Discussion started by: atmosroll
7 Replies

8. OS X (Apple)

Virtual screen accessed by Screen Sharing

Hi, I'm trying to create a virtual screen, (maybe xvfb? or any other virtual screen buffer) and be able to use Screen Sharing to connect to it. The setup is that I have a Mac Mini connected to the TV. But when my girlfriend is using Front Row, I can't use Screen Sharing at the same time from... (0 Replies)
Discussion started by: linge
0 Replies

9. Shell Programming and Scripting

Content of Content of a variable!

I got a sample BASH script like this : $ cat test MYVAR=$1 DUMMY1="This is tricky" DUMMY2=24 echo $ $ ./test DUMMY1 ./test: line 5: This is tricky: syntax error in expression (error token is "is tricky") **I was expecting the output as "This is tricky", ah! but no luck **But... (2 Replies)
Discussion started by: jaduks
2 Replies

10. UNIX for Dummies Questions & Answers

How to print content on the screen

I have the following questions regrading Unix commands. 1. Could you provide the commands how to print the content of .profile and .shrc files on the screen using more and piple command? or a better way? 2. How can i use the head and tail to display lines from 25 through 75... or a better... (4 Replies)
Discussion started by: aadba
4 Replies
Login or Register to Ask a Question