I'm using a complete command in tcsh this way, the echo cmd is just for the example :
And that works just great returning what the python script is printing out.
However I want to give an argument to the python script to narrow down its results and here comes the problem. I tried many things I found on Internet :
And other examples using more backslashes but returning errors.
In any case, print $1 was never evaluated, this page on tcsh.org seems to say that it should be possible though :
tcsh.html/Builtin_commands.html#complete
But I couldn't get the example to work properly somehow.
Bumping up posts is not permitted in these forums.
Please read the rules, which you agreed to when you registered, if you have not already done so.
You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully.
You'll get a lot more help in this forum when dealing with shells that follow Bourne shell syntax than with shells that use csh style shell syntax. In Bourne shell syntax, command substitutions and positional variables are processed when they appear in a double-quoted string, but are not expanded when they appear inside a single-quoted string. I do not use csh or tcsh, but you might try:
instead of:
I couldn't exactly make it work with what you wrote but the $COMMAND_LINE put me on the right track and helped my research a lot and I found something which worked great !
Hello !
I'm creating a CGI which allow to display graph from some data.
The datas looks like :
2020-01-13-00-00,384.00,350.00
2020-01-13-06-00,384.00,350.00
2020-01-13-12-00,384.00,350.00
2020-01-13-18-00,384.00,350.00
2020-01-14-00-00,384.00,350.00... (1 Reply)
Hi Experts,
I am working one one python script in version 3.x and 2.6. Need your support to complete it
Basically for both commands i have telnet to device and run command and then receiving input File 1 and File 2
I have two commands, need to grep data and output in csv file.
Next script/code... (0 Replies)
In the below python code..
Could anyone please let me know why the name(variable) is getting modified if I update the kargs variable in the definition,
def f( kargs):
kargs.extend()
print ("In function :",kargs)
name =
f(name)
print("Outside function :",name)
Output
... (5 Replies)
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Hello dear community!
I've recently written a BASH function for auto completion of options. It works like following: if a user types a command and then an argument to this command which starts with "^-" and then presses TAB, then 'user_command --help (or -h)' is invoked and possible options are... (0 Replies)
Hi,
Previously, if I type !cp <tab> the last cp command would come automatically. However, something has changed recently with my system.
I am unable to get a autocomplete !cp <tab> now. Where can I look for the changes ? Any idea what might have caused it ? (1 Reply)
Can someone please help me with this SHELL script?
I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1.
Here is a start but I have no clue how to... (3 Replies)
My client`s system is an AIX 4.2 and using the Kron shell. I was just wondering if it is possible to have the prompt autocompletion enabled on it without changing shell version.
By autocompletion, I mean to automatically complete the filenames or directories we type in using the Tab key. (2 Replies)
Say, I want to move into dir library from current dir, on prompt if I type in
cd li
if it is followed by pressing 'Tab' key then complete dir name appears.
Would there anyone know, how we can make into effect this path autocompletion?
I am using 'ksh'. (5 Replies)