Hi everybody:
I try to print in new file selected lines from another file wich depends on the first column.
I have done a script like this:
lines=( "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "21" "31" "41" "51" "55" "57" "58" )
${lines}
for lines in ${lines}
do
awk -v ... (6 Replies)
I have an if statement where I state that if there are more than one records (lines) found containing a string in a file, then it enters into a while loop to use each line for as many lines as there are and then stop.
Trouble is, I can't figure out how to move to the next instance of each line. ... (2 Replies)
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
awk '!(/^$/||/--/||/selected/||/^ *$/){print "A." $1 " <> B." $1 " or"}' infile
my AWK out put is :
A.KZ <> B.KZ or
A.KZT <> B.KZT or
A.KZ_Z <> B.KZ_Z or
A.LH <> B.LH or
A.MAN<> B.MAN or
A.OBJEKT <> B.OBJECT or
A.PAK <> B.PAK ;
is there any way to controle AWK to not print the... (1 Reply)
I want to delete a line between selected lines using sed:
e.g. : Between "bus" to "pins", delete lines conaining "signal" word.
Input :
bus
direction
signal new
signal old
pins
signal ok
end
Desired Output:
bus
direction
pins
signal
end (4 Replies)
HI,
I need one help to generate the file based on few condition,
I need to print only those line which has N and delete the line which as all Y's. ANd I need to compare only the fields which are marked as Y and N .
And one more thing is in the below file 1 and file 2 and file2 abc, dbc can... (6 Replies)
Hello,
I have a file, which looks like:
I want to print the row containg "PRO" in second column after comparing and finding the minimum value of fifth column present in all "PRO". and likewise for every other string present in second column.
I am using :
filename=list... (2 Replies)
Ultimate goal is to delete lines from before and after a block of lines in a given file. First attempt was something like this:
sed -e '1,/STARTUP/ d' inputfile.txt > outputfile.txt
but that deleted everything down to and including the line with STARTUP. I need to delete everything before... (6 Replies)
two files: one with the line number only, and the 2nd one with line number and content, as following:
line_file.txt
1
3
5
9
23
30
content_file.txt
1|we are the world|good|great
2|easily do this by highlighting you|easily do this by highlighting you|easily do this by highlighting... (2 Replies)
Hi Guys ,
I have two files say a1 and a2 having following contents
a1
dag
wfd
a2
dag
wfd
chire
hcm
I want to delete only the lines in a2 which are in a1 and final output of a2 should be
a2
chire
hcm (6 Replies)
Discussion started by: Pradeep_1990
6 Replies
LEARN ABOUT SUSE
create_constraint_trigger
CREATE CONSTRAINT TRIGGER(7) SQL Commands CREATE CONSTRAINT TRIGGER(7)NAME
CREATE CONSTRAINT TRIGGER - define a new constraint trigger
SYNOPSIS
CREATE CONSTRAINT TRIGGER name
AFTER event [ OR ... ]
ON table_name
[ FROM referenced_table_name ]
{ NOT DEFERRABLE | [ DEFERRABLE ] { INITIALLY IMMEDIATE | INITIALLY DEFERRED } }
FOR EACH ROW
EXECUTE PROCEDURE funcname ( arguments )
DESCRIPTION
CREATE CONSTRAINT TRIGGER creates a constraint trigger. This is the same as a regular trigger except that the timing of the trigger firing
can be adjusted using SET CONSTRAINTS [set_constraints(7)]. Constraint triggers must be AFTER ROW triggers. They can be fired either at
the end of the statement causing the triggering event, or at the end of the containing transaction; in the latter case they are said to be
deferred. A pending deferred-trigger firing can also be forced to happen immediately by using SET CONSTRAINTS.
PARAMETERS
name The name of the constraint trigger. This is also the name to use when modifying the trigger's behavior using SET CONSTRAINTS. The
name cannot be schema-qualified -- the trigger inherits the schema of its table.
event One of INSERT, UPDATE, or DELETE; this specifies the event that will fire the trigger. Multiple events can be specified using OR.
table_name
The (possibly schema-qualified) name of the table in which the triggering events occur.
referenced_table_name
The (possibly schema-qualified) name of another table referenced by the constraint. This option is used for foreign-key constraints
and is not recommended for general use.
DEFERRABLE
NOT DEFERRABLE
INITIALLY IMMEDIATE
INITIALLY DEFERRED
The default timing of the trigger. See the CREATE TABLE [create_table(7)] documentation for details of these constraint options.
funcname
The function to call when the trigger is fired. See CREATE TRIGGER [create_trigger(7)] for details.
arguments
Optional argument strings to pass to the trigger function. See CREATE TRIGGER [create_trigger(7)] for details.
COMPATIBILITY
CREATE CONSTRAINT TRIGGER is a PostgreSQL extension of the SQL standard.
SEE ALSO
CREATE TRIGGER [create_trigger(7)], DROP TRIGGER [drop_trigger(7)], SET CONSTRAINTS [set_constraints(7)]
SQL - Language Statements 2010-05-14 CREATE CONSTRAINT TRIGGER(7)