Custom Commands: prompt

Advertisement

Hackepeter
Guest

Custom Commands: prompt

Hopefully I find a way to describe what I want to do...

I have some custome commands set to extract(grep) datasets from bigger file to an extra file with a special name.
her is my command:
cat ! | egrep '^E.!?input:?0000000000!' >extract_TR_###.file
At the position ### I want to set the filename to what I have typed in the prompt.
How can I do this? Is there a special variable used for what was passed by the input(prompt)?

Thanx

Reply with quote

Advertisement

Hackepeter
Guest

Custom Commands: prompt

Thanx,

but I think my question was not clear enough. Sorry for my english..

In the command I ask for a parameter to search for. OK

I want to write the grep-output to a file named with the search-parameter.
for instance:

If I search for the string 01234567 then I want to write a file wich is named: extract_01234567.file

My question was if this is possible without asking twice with an ?input-command

Thanx again

Reply with quote

Advertisement

You can post new topics in this forum