This forum has been archived. All content is frozen. Please use KDE Discuss instead.

konsole -e {program} :: feeding initialization settings

Tags: None
(comma "," separated)
barrycombs
Registered Member
Posts
2
Karma
0
Is there a way to feed commands to the {program} when starting with "konsole -e {program}" ??
I would like to feed in a number of lines of selections and then allow a user to continue from that point.
Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
In a normal terminal, what form of command would this take?
If you place quotes around the argument to -e, then you should be able to do this.

Example: command I want to run is:
Code: Select all
foo --bar xyz

The Konsole command should be:
Code: Select all
konsole -e "foo --bar xyz"


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
barrycombs
Registered Member
Posts
2
Karma
0
Thanks, I will experiment with it..
But the commands sequence fed into the executable each have a line-feed <Enter> after them.
I will try \n or some other coding to insert them in as a single string.
I would appreciate a suggestion, however !
Muchas Gracias.
========== (later input) =============
Experiment : line feeds cause all selections to be interpreted as
separate "sh" commands (i.e., numbers in this case) and the "command is not found";
I was hoping here was a trick method to get the command sequence fed into the startu {program}
and then still allow a user to take over that window and interact as normal.
/Thanks for any help / suggestions.
===
===== (using a work-around) ======
I am using a post-startup cut-paste file for initializing,
but it would be cool if anyone has a better idea.
I will weekly check back to see if a genius shows up with it.
Thanks.
====
I tried that, with a "<" redirect, but the -e prog became very confused (errors);
unfortunately I do not have access to the prog code: it expects user-inputs (menu selections).
===== end ===

Last edited by barrycombs on Fri Jul 27, 2012 1:15 pm, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
As another idea, you could place the script you need into a separate script which you point to with your konsole -e script.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell