displaying stdout of a script using vi editor


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers displaying stdout of a script using vi editor
# 1  
Old 06-28-2009
displaying stdout of a script using vi editor

Hi,
Is there a way to display the stdout of a script using vi editor without writing the stdout to a file.

I have a script (format.sh) which reads a file and displays it in a special format.
i want to see this displayed text using vi editor?

currently i am doing:
format.sh myfile> out.txt
vi out.txt

but can i do it in one shot without using a temporary out.txt file

thanks in advance...
# 2  
Old 06-28-2009
This works for me...

Code:
cat file1 | vi -

(where "cat file" is your program - i.e. format.sh)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[BASH] Performance question - Script to STDOUT

Hello Coders Some time ago i was asking about python and bash performances, and i was told i could post the regarding code, and someone would kindly help to make it faster (if possible). If you have noted, i'm on the way to finalize, finish, stable TUI - Text(ual) User Interface. It is a... (6 Replies)
Discussion started by: sea
6 Replies

2. UNIX for Advanced & Expert Users

Init.d script stdout location

I'm looking into a Solaris(S10) startup problem, with a script configured to run in /etc/rc3.d. It's written to output trace information to a logfile using tee, but the file itself is clearly not being updated. Is there a default stdout/stderr location for startup scripts where the other branch of... (6 Replies)
Discussion started by: JerryHone
6 Replies

3. Shell Programming and Scripting

Mkbootfs writing to stdout in bash script

Hi, I need to automate some repacking tasks of a boot image for Android When in command line, I can use this command: mkbootfs /path/to/root > /path/to/ramdisk-recovery.cpio;However, if I try to run the command from a shell script under Ubuntu, it fails and outputs to stdout instead of the... (27 Replies)
Discussion started by: Phil3759
27 Replies

4. Shell Programming and Scripting

Help me to modify my script in stdout

please help me to modify my script #! /bin/bash while read line do echo "$line" >>/tmp/result && mysql -ss -e "use $line; select count(*) from users where type='admin' and deleted = 0;" > /tmp/result; done < /tmp/db_data cat result alan_hardwsdefs 2 bgrmods 2 claudiatdsefs 1... (2 Replies)
Discussion started by: unimaxlin
2 Replies

5. Shell Programming and Scripting

how to convert a shell script to a php script for displaying next word after pattern match

I have a shell script which I made with the help of this forum #!/bin/sh RuleNum=$1 cat bw_rules | sed 's/^.*-x //' | awk -v var=$RuleNum '$1==var {for(i=1;i<=NF;i++) {if($i=="-bwout") print $(i+3),$(i+1)}}' Basically I have a pages after pages of bandwidth rules and the script gives... (0 Replies)
Discussion started by: sb245
0 Replies

6. Shell Programming and Scripting

execute script without displaying child script messages

Hi i have a script which is calling another script. But my child script is displaying some values. sample script. export LOG_File=/log $/Project/Scripts/emit.ksh mv inner_test.ksh /log/test.ksh echo 'Success' here emit.ksh is doing some processing .and echoing some values. what i... (2 Replies)
Discussion started by: kam786sim
2 Replies

7. Shell Programming and Scripting

STDOUT and STDERR redirection within a script

Hello all, I have a for loop executing in a script that I want to redirect STDOUT to screen and to file, while directing STDERR to the bit bucket. Here is the general sentax of what I'm doing: for i in thingy do some_command ${i} done 1>&1 | tee ${LOGFILE} 2> /dev/null What I am... (2 Replies)
Discussion started by: LinuxRacr
2 Replies

8. UNIX for Advanced & Expert Users

How to capture STDOut of script in a CGI script?

Hi Perl Experts, I am invoking a shell script thru a perl script and the perl script is cgi script.I need to capture the STDOUT of the shell script in the html page where I am invoking the script .?The shell script takes couple of mintutes to complete its execution .Mean while my html page does... (1 Reply)
Discussion started by: kittu1979
1 Replies

9. Shell Programming and Scripting

Script Output Woes (stdout?)

Hey everyone. I have been trying a few filtering scripts with both SED and PERL. So far I have both of these versions working to reformat the incoming text stream (from stdin) into the corrent format (it looks good in the terminal), but I don't think that I am doing it right because the... (2 Replies)
Discussion started by: c0nn0r
2 Replies

10. SCO

vi editor not displaying?

Hi guys, I have changed some path in the vi .profile and then i shutdown the system and when i reboot it i was unable to use vi. It is showing vi not found.Likewise for few other commands also. How to solve this problem and make vi work again. Plz. do provide the answer it is... (3 Replies)
Discussion started by: ananthu_m
3 Replies
Login or Register to Ask a Question