viewing stdout of shell command in gvim


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting viewing stdout of shell command in gvim
# 1  
Old 10-27-2011
Question viewing stdout of shell command in gvim

Hi,

What I would like to do is to grep and view the results in a separate gvim window all in a single command. Something like:

view_this_stdout_in_gvim < grep something my_path/

And not just for grep, but for any command's STDOUT...

How can I do this in csh / tcsh ?

Thanks,
SK
# 2  
Old 10-27-2011
Just tell vim to edit stdin:

Code:
 % grep something my_path | gvim -

In bash you can also do this with standard vi by using process subsitution:
Code:
 $ vi <(grep something my_path)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Command for viewing hba cards on rhel7

hi all, I am trying to view the hba cards on a rhel7 server (storage says they are there, but I am not seeing them. I tried lspci -nn | grep -i hba lspci |grep qla I tried looking in /sys/class/fc_host.. but it is empty. I am not sure if I am looking in the right spot... (0 Replies)
Discussion started by: gartie
0 Replies

2. Shell Programming and Scripting

Redirecting stdion, stdout within an AT command

Hello, I'm strugling with some redirecting and all help is apreciated. The following program is working as expected, but the result of the AT command doesn't go to any file. Thanks in advance for the help. #!/bin/bash modem=/dev/ttyUSB1 file=/root/imsi.txt # print error to stderr and exit... (4 Replies)
Discussion started by: cleitao
4 Replies

3. Shell Programming and Scripting

redirecting to stdout in betwen command

can anyone help me in making singleline command for Capital Letters are folders ,small letter are files X,Y,Z are subfolders of A as shown below A - X,Y,Z Folder X has three files a.txt,b.txt,c.txt similarly Y,Z. as shown below X- a.txt,b.txt,c.txt Y- a.txt,b.txt,c.txt Z-... (4 Replies)
Discussion started by: phoenix_nebula
4 Replies

4. Shell Programming and Scripting

Redirecting stdin/stdout to/from command from/to string

Hi, I am working on a project where I have to generate and execute nasm code on-the-fly. I generate the code in a file program.asm and then execute it.This output is to stdout which i redirect to an output file which i read back to compare results: system("nasm -f elf program.asm >... (5 Replies)
Discussion started by: doc_cypher
5 Replies

5. Shell Programming and Scripting

can't close stdin/stdout in shell

#!/bin/sh exec 0</dev/null exec 1>/dev/null ls -l /proc/self/fd >&2 produces total 0 lr-x------ 1 tyler users 64 Feb 18 10:38 0 -> /proc/7886/fd lrwx------ 1 tyler users 64 Feb 18 10:38 1 -> /dev/pts/4 lrwx------ 1 tyler users 64 Feb 18 10:38 2 -> /dev/pts/4 I've verified the shell is... (10 Replies)
Discussion started by: Corona688
10 Replies

6. UNIX for Dummies Questions & Answers

Bourne shell viewing files in directory

Hi, I have a program that get a directory name from the user, then the program should go through one by one of the file, asking the user whether to move it to another folder. I tried to list the time of the file one by one. But it seems like it doesn't work. The code is as follow: check() {... (10 Replies)
Discussion started by: mInGzaiii
10 Replies

7. UNIX for Advanced & Expert Users

STDOUT redirect to a FILE, when fuser command is used !!

Hi all, I have the following script: ------------------------------------------------- #SCRIPT TO CHECK WHO HAS ACCESSED THE LOG/FILE IN PAST 'N' MINUTES, AND MAIL ACCORDINGLY. MYPATH="/clocal/mqbrkrs/user/mqsiadm/sanjay/" MAIL_RECIPIENTS="vg517@dcx.com" Subject="File accessed in last... (6 Replies)
Discussion started by: varungupta
6 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. HP-UX

changing col(1) command stdout as fully buffered?

Hi All, I am talking about unix col(1) command used for some reverse line filtering etc. And I notice that the stdout of this command is line buffered i.e. the stdout will flush the data in its buffer line by line. So the number of writes performed by stdout are more. So now if I make stdout... (0 Replies)
Discussion started by: sunilsbjoshi
0 Replies

10. UNIX for Advanced & Expert Users

changing col(1) command stdout as fully buffered?

Hi All, I am talking about unix col(1) command used for some reverse line filtering etc. And I notice that the stdout of this command is line buffered i.e. the stdout will flush the data in its buffer line by line. So the number of writes performed by stdout are more. So now if I make stdout... (0 Replies)
Discussion started by: sunilsbjoshi
0 Replies
Login or Register to Ask a Question