or I don't know how to make it work ...
Hello
im trying to build regexp that will match me single string or function call inside of brackets
for example I have :
<% myFunction("blah",foo) %>
or
<% myVar %>
and not match :
<% if(myFunction("blah",foo)==1) %>
or
<% while(myvar < 3){... (2 Replies)
Hi everybody
for file in *
#Bash performs filename expansion
#+ on expressions that globbing recognizes.
do
output="`grep -n "$1" "$file"`"
echo "$file: `expr "$output" : '\(^.*$\)'`"
done
In the above bash script segment, I try to print just the first line of string named... (3 Replies)
Hi. Here's a tricky one (at least to me):
I have a file named theFile.txt (UTF-8) that contains the following:
a
b
cWhen I execute
perl -pe 's|a.*c|d|sg' theFile.txtin bash 3.2 on MAC OS X 10.6, I get no match, i.e. the result is
a
b
cagain. Any clues why? (2 Replies)
Hi,
I searched in the forums, but I didn't find a good solution. My problem is:
I have a string like "TEST.ABC201005.MONTHLY.D101010203".
I just want to have the string until the D100430, so that the string should look like: "TEST.ABC201005.MONTHLY.D"
The last characters after the D can be... (8 Replies)
Hello everyone,
I'm new in tcl scripting.
I'm currently studying a tcl script and came across this line:
regexp {(\d+)(\S?)} $opts match opt swi
According to my understanding, this line means to search in the opts variable for one or more digit, followed by a non-whitespace character... (2 Replies)
I'm probably just not thinking of the correct term to search for :-) But I want to match a pattern that might be 'ABC' or '1ABC' there might be three characters, or there might be four, but if there are four, the first has to be 1 (1 Reply)
Hi All,
I have a file fo around 15k bytes which i need to insert a string " + "at every 250 bytes.
I found some ideas here using perl to split into lines and tried to addapt it but the results where not satisfactory
for instance i tried to change
#!/usr/bin/perl
$teststring =... (9 Replies)
Greetings Experts,
I am in AIX; I have a file generated through awk after processing the input files. Now I need to replace or remove the new-line characters on all lines that doesn't have a ; which is the last character on the line. I tried to use sed 's/\n/ /g' After checking through the... (6 Replies)
For a given string that may contain any ASCII chars, i.e. that matches .*,
find and print only the chars that are in a given subset.
The string could also have numbers, uppercase, special chars such as ~!@#$%^&*(){}\", whatever a user could type in
without going esoteric
For simplicity take... (1 Reply)
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
LEARN ABOUT DEBIAN
macrocmd
MacroCmd(3U) InterViews Reference Manual MacroCmd(3U)NAME
MacroCmd - a command that composes other commands
SYNOPSIS
#include <Unidraw/Commands/macro.h>
DESCRIPTION
MacroCmd composes other commands in a linear fashion. Executing a MacroCmd is equivalent to executing its children in preorder.
PUBLIC OPERATIONS
MacroCmd(ControlInfo*)
MacroCmd(
Editor* = nil,
Command* first = nil, Command* second = nil,
Command* third = nil, Command* fourth = nil
)
Construct a MacroCmd instance, optionally supplying up to four of its child commands.
virtual void Execute()
virtual void Unexecute()
virtual boolean Reversible()
Execute simply executes each child, from first to last. Unexecute calls Unexecute on each child, from last to first. The MacroCmd
is reversible if any of its children are.
virtual void SetEditor(Editor*)
SetEditor calls SetEditor on each child with the given argument.
Command* GetCommand(Iterator)
void SetCommand(Command*, Iterator&)
GetCommand returns the child Command to which an iterator points. SetCommand initializes the iterator to point to a particular
child Command; it initializes the iterator to point to a nil instance if the given Command is not a child.
void Append(
Command*, Command* = nil, Command* = nil, Command* = nil
)
void Prepend(
Command*, Command* = nil, Command* = nil, Command* = nil
)
void InsertAfter(Iterator, Command*)
void InsertBefore(Iterator, Command*)
void Remove(Command*)
void Remove(Iterator&)
Operations that modify the MacroCmd's list of children. Append and Prepend add up to four Commands to the end and the beginning of
the list, respectively. InsertAfter and InsertBefore insert a Command after and before the Command pointed to by the iterator,
respectively. The Remove operations remove a child from the list without deleting it. You can remove a child by referring to it
explicitly or by specifying an iterator. If an iterator is supplied, the Remove operation should advance it to point to the follow-
ing child as a side effect.
PROTECTED OPERATIONS
Command* Cmd(UList*)
UList* Elem(Iterator)
Convenience functions for extracting a Command from a UList element a UList from an iterator, respectively.
SEE ALSO Command(3U), Iterator(3U), UList(3U)Unidraw 24 January 1991 MacroCmd(3U)