09-26-2010
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI All
Im new to shell scripting...kindly plz help me...
I need a shell script for:
We have to take export of all db's on daily basis from all svr's and keep these export backups on diffrent server.
Plz help.
Regards
Gaurav (5 Replies)
Discussion started by: ergauravtaneja
5 Replies
2. Shell Programming and Scripting
i have the long file more than one ns and www and mx in the line like .
i need the first ns record and first www and first mx from line .
the records are seperated with tthe ; i am try ing in awk scripting not getiing the solution.
... (4 Replies)
Discussion started by: kiranmosarla
4 Replies
3. UNIX for Dummies Questions & Answers
Hi, I'm trying to find the position of a series of numbers within a large text file. The numbers are separated by spaces.
This works fine:
type Huge_File.txt | gawk "{print index($0,"255")}"
But this does not:
type Huge_File.txt | gawk "{print index($0,"188 028 239 160 016 190 137... (4 Replies)
Discussion started by: Lemming42
4 Replies
4. Shell Programming and Scripting
Hi, all
I have a file containing the following data:
name: PRODUCT_1
date: 2010-01-07
really_long_name: PRODUCT_ABCDEFG
I want to get the date (it is "2010-01-07" here), I could use the following code to do that:
awk... (6 Replies)
Discussion started by: kevintse
6 Replies
5. Shell Programming and Scripting
Hi All,
How to remove col1 and last column in a line. Please suggest some awk stuffs.
Input
col1 col2 col3 col4
col1 col2 col3 col4 col5
col1 col2 col3 col4
col1 col2 col3
Output
Processing col2 col3 ...
Processing col2 col3 col4 ...
Processing col2 col3 ...
Processing... (5 Replies)
Discussion started by: k_manimuthu
5 Replies
6. Shell Programming and Scripting
Hi,
I've this file:
1,
2,
3,
4,
5,
6,
I need to remove the line feed LF every 3 row.
1,2,3,
4,5,6,
Thanks in advance,
Alfredo (5 Replies)
Discussion started by: alfreale
5 Replies
7. Shell Programming and Scripting
I am an awk beginner and need help figuring out how to search for a number in the first column and if it (or anything greater) exists, remove those lines.
AM11400012012 2.26 2.12 1.98 2.52 3.53 3.01 3.62 5.00 3.65 7.95 0.79 3.88 0.00
AM11400012013 3.39 2.29 ... (1 Reply)
Discussion started by: ncwxpanther
1 Replies
8. Shell Programming and Scripting
I would like to remove lines with certain pattern but only Estimate: and Realised: in USD and Date: shall be output. The order of the currency are mixed.
Output
I failed on awk with sub, gensub and was not able to remove the multiple entry on the * Date: (2 Replies)
Discussion started by: sdf
2 Replies
9. Shell Programming and Scripting
In the following tab-delimited input, I am checking $7 for the keyword intronic. If that keyword is found then $2 is split by the . in each line and if the string after the digits or the +/- is >10, then that line is deleted. This will always be the case for intronic. If $7 is exonic then nothing... (10 Replies)
Discussion started by: cmccabe
10 Replies
10. Shell Programming and Scripting
Trying to use awk to remove a line only if $1 contains either ; or :. Thje awk below runs but no lines are removed. Thank you :).
awk
awk '$1 !~ /;/ || $1 !~ /:/ { print }' file
file
AARS2;TMEM151B 1
AASS 2
ABAT 3
ABCA1 3
ABCA10 1
ABCA12 2
ABCA13 1
ABCA13:AX746840 2
ABCA2 5 (5 Replies)
Discussion started by: cmccabe
5 Replies
IGAWK(1) Utility Commands IGAWK(1)
NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO
gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)