Sponsored Content
Top Forums Shell Programming and Scripting how to append into array thru awk Post 302137019 by manas_ranjan on Friday 21st of September 2007 06:00:13 AM
Old 09-21-2007
thanx a lot.....
i did it in some other way....
awk '{c=split($0, s); for(n=1; n<=c; ++n) print s[n] }' $1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append using awk

Hi All, I have a problem with my awk script. I am trying to append the whole line to another file called " file.txt " but i can't. I suppose there's something wrong in the way that i pipe. I canot use " nawk -f awk_script input > file.txt " because i have a 2nd input. Can any expert give some... (4 Replies)
Discussion started by: Raynon
4 Replies

2. Shell Programming and Scripting

Append using SED/AWK

Hi friends, I have a file with content SOME TEXT HERE I want to append the string GREAT to Line 1 of my file such that the file content should be GREAT SOME TEXT HERE I can do a cat for the string great and file >> newfile and then rename newfile name to file But this does not put... (5 Replies)
Discussion started by: dahlia84
5 Replies

3. Shell Programming and Scripting

Python- How to append to an array

Hello, I wrote the following in python that parses mathematical expressions and I'm trying to store the results in an array. For example, if I enter 3+4*2, the array should be . Unfortunately, I get the following: Can anyone help me figure out what is wrong? The tokenizer seems to work... (0 Replies)
Discussion started by: jl487
0 Replies

4. Shell Programming and Scripting

HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ?

Hello experts, I'm stuck with this script for three days now. Here's what i need. I need to split a large delimited (,) file into 2 files based on the value present in the last field. Samp: Something.csv bca,adc,asdf,123,12C bca,adc,asdf,123,13C def,adc,asdf,123,12A I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies

5. Shell Programming and Scripting

How to append to array within conditional block in ksh/korn shell?

Hi, I have one array created and some values are there in ksh. I want to append some other values to it based on some condition in if statement. #!/bin/ksh echo "---------------------------------------------------" set -A ipaddr_arr $(egrep -v '^#|^::|^$' /etc/hosts |awk '{print $1}'... (2 Replies)
Discussion started by: sanzee007
2 Replies

6. Shell Programming and Scripting

How to Assign an shell array to awk array?

Hello All, Can you please help me with the below. #!/bin/bash ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5 EXTRACT_DT:30-SEP-12 VER_NUM:1" ARR="No Differences In Stage Between HASH_TOTALS & HASH_TOTALS_COMP For UNINUM:0722075 PROVIDER:5... (14 Replies)
Discussion started by: Ariean
14 Replies

7. Shell Programming and Scripting

Awk: Append new elements to an array

Hi all, I'm dealing with a bash script to merge the elements of a set of files and counting how many times each element is present. The last field is the file name. Sample files: head -5 *.tab==> 3J373_P15Ac1y2_01_LS.tab <== chr1 1956362 1956362 G A hom ... (7 Replies)
Discussion started by: lsantome
7 Replies

8. Shell Programming and Scripting

Append awk results into file or array

for a in {1..100} do awk '{ sum+=$a} END {print sum}' a=$a file1 > file2 done I know I will get only one number if following the code above, how can I get 100 sum numbers in file2? (2 Replies)
Discussion started by: wanliushao
2 Replies

9. UNIX for Beginners Questions & Answers

Append header with awk

I have to append the header (ie "START OF LINE") to a file only if there is data in it. Below command is showing header though there is no data in a file, can you suggest how to correct.. awk '{NR!=0} BEGIN{print "START OF LINE"}; {print}' file (3 Replies)
Discussion started by: JSKOBS
3 Replies

10. UNIX for Beginners Questions & Answers

Bash to append array value to file before copying

The bash stores each uniqueid in an array and then passes them to %q to get the unique path. That seems to work what I am having trouble with is renaming each .png with the unique value in %q. I thought it was working but upon closer inspection, a .png file is being sent to scp.... but only 1 and... (21 Replies)
Discussion started by: cmccabe
21 Replies
DROP OPERATOR 
FAMILY(7) PostgreSQL 9.2.7 Documentation DROP OPERATOR FAMILY(7) NAME
DROP_OPERATOR_FAMILY - remove an operator family SYNOPSIS
DROP OPERATOR FAMILY [ IF EXISTS ] name USING index_method [ CASCADE | RESTRICT ] DESCRIPTION
DROP OPERATOR FAMILY drops an existing operator family. To execute this command you must be the owner of the operator family. DROP OPERATOR FAMILY includes dropping any operator classes contained in the family, but it does not drop any of the operators or functions referenced by the family. If there are any indexes depending on operator classes within the family, you will need to specify CASCADE for the drop to complete. PARAMETERS
IF EXISTS Do not throw an error if the operator family does not exist. A notice is issued in this case. name The name (optionally schema-qualified) of an existing operator family. index_method The name of the index access method the operator family is for. CASCADE Automatically drop objects that depend on the operator family. RESTRICT Refuse to drop the operator family if any objects depend on it. This is the default. EXAMPLES
Remove the B-tree operator family float_ops: DROP OPERATOR FAMILY float_ops USING btree; This command will not succeed if there are any existing indexes that use operator classes within the family. Add CASCADE to drop such indexes along with the operator family. COMPATIBILITY
There is no DROP OPERATOR FAMILY statement in the SQL standard. SEE ALSO
ALTER OPERATOR FAMILY (ALTER_OPERATOR_FAMILY(7)), CREATE OPERATOR FAMILY (CREATE_OPERATOR_FAMILY(7)), ALTER OPERATOR CLASS (ALTER_OPERATOR_CLASS(7)), CREATE OPERATOR CLASS (CREATE_OPERATOR_CLASS(7)), DROP OPERATOR CLASS (DROP_OPERATOR_CLASS(7)) PostgreSQL 9.2.7 2014-02-17 DROP OPERATOR FAMILY(7)
All times are GMT -4. The time now is 07:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy