10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
2. UNIX for Dummies Questions & Answers
I have a large file and many lines are duplicated. I'm trying to delete lines with every second occurrence of a pattern. Did tried searching similar question but no luck.
I can delete all lines matching pattern with :g/pattern/d but don't want to lose data.
Sample pattern to delete... (6 Replies)
Discussion started by: homer4all
6 Replies
3. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies
4. Shell Programming and Scripting
Hi,
Do anybody know how to use awk to count the pattern at specific column?
Input file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a
.
.
Output file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a 3
.
.
I plan to count how many "miR" in column 3... (2 Replies)
Discussion started by: cpp_beginner
2 Replies
5. Linux
Hi
I have to replace a pattern found in the first uncommented line in a file. The challenge I'm facing is there are several such similar lines but I have to edit only the first uncommented line.
Eg:
#this is example
#/root/xyz:Old_Pattern
/root/xyz:Old_Pattern
/root/xyz:Old_Pattern
... (10 Replies)
Discussion started by: Stoner008
10 Replies
6. Shell Programming and Scripting
Hello all,
I have a input file like this.
input file
---------------
abc ab001 + ab002 zca
acb ab006 + ab007 caz
cba ab003 + ab004 zca
bac ab004 - ab005 zac
bca ab002 - ab003 cza
cba ab005 + ab006 acz
cba ab005 ... (5 Replies)
Discussion started by: admax
5 Replies
7. Shell Programming and Scripting
hi,
is it possible to find the number of occurences of a pattern between two paranthesis.
for e.g
i have a file as below.
>>{
>>hi
>>GoodMorning
>>how are you?
>>}
>>is it good,
>>tell me yes, if it is good
In the above file, its clear the occurence of word "Good"... (17 Replies)
Discussion started by: divak
17 Replies
8. Shell Programming and Scripting
I would like to use sed to replace one occurence of a pattern in a file. When I use the s/// command it replaces all occurences of the pattern in the file. Should I be using something other than sed?
Thanks (6 Replies)
Discussion started by: ss9u
6 Replies
9. Shell Programming and Scripting
Hi
I need a perl onliner which seaches a line starting with a pattern(last occurence) and display it.
similar to
grep 'pattern' filename | tail -1 in UNIX
Ex: I want to display the line starting with "cool" and which is a last occurence
adadfadafadf
adfadadf
cool dfadfadfadfara... (4 Replies)
Discussion started by: ammu
4 Replies
10. UNIX for Dummies Questions & Answers
How can we find the number of occurence of a specified pattern in a file?
This command would be a part of a shell script. (5 Replies)
Discussion started by: videsh77
5 Replies
SET
CONSTRAINTS(7) SQL Commands SET CONSTRAINTS(7)
NAME
SET CONSTRAINTS - set constraint checking modes for the current transaction
SYNOPSIS
SET CONSTRAINTS { ALL | name [, ...] } { DEFERRED | IMMEDIATE }
DESCRIPTION
SET CONSTRAINTS sets the behavior of constraint checking within the current transaction. IMMEDIATE constraints are checked at the end of
each statement. DEFERRED constraints are not checked until transaction commit. Each constraint has its own IMMEDIATE or DEFERRED mode.
Upon creation, a constraint is given one of three characteristics: DEFERRABLE INITIALLY DEFERRED, DEFERRABLE INITIALLY IMMEDIATE, or NOT
DEFERRABLE. The third class is always IMMEDIATE and is not affected by the SET CONSTRAINTS command. The first two classes start every
transaction in the indicated mode, but their behavior can be changed within a transaction by SET CONSTRAINTS.
SET CONSTRAINTS with a list of constraint names changes the mode of just those constraints (which must all be deferrable). The current
schema search path is used to find the first matching name if no schema name is specified. SET CONSTRAINTS ALL changes the mode of all
deferrable constraints.
When SET CONSTRAINTS changes the mode of a constraint from DEFERRED to IMMEDIATE, the new mode takes effect retroactively: any outstanding
data modifications that would have been checked at the end of the transaction are instead checked during the execution of the SET CON-
STRAINTS command. If any such constraint is violated, the SET CONSTRAINTS fails (and does not change the constraint mode). Thus, SET CON-
STRAINTS can be used to force checking of constraints to occur at a specific point in a transaction.
Currently, only foreign key constraints are affected by this setting. Check and unique constraints are always effectively not deferrable.
Triggers that are declared as ``constraint triggers'' are also affected.
NOTES
This command only alters the behavior of constraints within the current transaction. Thus, if you execute this command outside of a trans-
action block (BEGIN/COMMIT pair), it will not appear to have any effect.
COMPATIBILITY
This command complies with the behavior defined in the SQL standard, except for the limitation that, in PostgreSQL, it only applies to for-
eign-key constraints.
SQL - Language Statements 2010-05-14 SET CONSTRAINTS(7)