[Konsole-devel] [Bug 131775] New: Possibility for I/O Redirection in Konsole

Dik Takken d.h.j.takken at phys.uu.nl
Thu Aug 3 12:18:21 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=131775         
           Summary: Possibility for I/O Redirection in Konsole
           Product: konsole
           Version: unspecified
          Platform: Gentoo Packages
        OS/Version: Linux
            Status: NEW
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: konsole-devel kde org
        ReportedBy: d.h.j.takken phys uu nl


Version:            (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
OS:                Linux

I often use Konsole in scripts and Kommander applications, to show the output of a command to the user, like this:

konsole -e <COMMAND>

Unfortunately, the script that runs Konsole cannot easily catch the output generated by the command. It is displayed in Konsole, but Konsole does not write the output to its stdout. Also, Konsole cannot take commands from stdin. 

My idea is that you can use Konsole like this:

uptime=$(konsole -e uptime)

which would have the same effect as just saying

uptime=$(uptime)

except for the fact that konsole shows the output of 'uptime' while it is running. Maybe Konsole could have a --outputredirection switch that suppresses the usual standard output generated by Konsole itself, and only output whatever appears in the running terminal.

The possibility to be able to pipe input into Konsole, and have Konsole redirect it to the running shell would also be very useful. You could then do this:

echo "ls" | konsole --outputredirection | sort > "filelist.txt"

Konsole will run the "ls" command, show the output to the user while also emitting it on stdout and exit when the "ls" command is finished.

A second form of input redirection that will be very useful should allow Konsole to act as a stream filter, like this:

ls | konsole -e cat /dev/stdin | sort > "sortedfilelist.txt"

This will pipe the output of "ls" to Konsole, Konsole redirects its stdin to the command that runs in its terminal window (cat /dev/stdin in this case) and duplicates the output of the command to its stdout.


It would be great if Konsole received some commandline switches for various forms of I/O redirection.



More information about the konsole-devel mailing list