Hey guys:
Running Solaris 5.5.1 and trying to write an easy /bin/sh script. Here is what I am doing...
grep "Total" /workspace_4/local/reports/cust_calls_5ess.050510 | awk '{print $4 "\t" $7 $8 $9 $10 $11 $12 $13 $14}'
It renders the following results...
315268 ... (2 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Hello!
I have the following lines in a file:
1|0|HEADER|
2|1|HEADER|
3|1|MAIN|
4|1|INFO|
5|1|INFO|
6|1|INFO|
7|2|INFO|
8|4|INFO|
9|55|FOOTER|
10|1|HEADER|
11|22|MAIN|
12|9|MAIN|
and I want to convert it into: (7 Replies)
Hi,
I am trying to replace 4th and 5th column data with the below code
awk -F, '$1=="ABC"&&$2=="XYZ" {gsub(/ABC/, "TEST" ,$4,$5)}' infile.txt > 1.txt
if the first column data is ABC and second column data is XYZ then replace ABC to test in 4th and 5th column, the above code is replacing the... (1 Reply)
i have a file that has data like
template.txt
Version:V1.0
name:ACTION
Number Of Actions:1
A:ACC,EVE,P1,1,1,ACC,2,ACC,3,1,5,20090228 10070800,6,20130628 10070800
now i have to replace all occurrence of ACC with a value and occurences of EVE with a value.
my shell script is as below
... (3 Replies)
Hi !
my input looks like that:
--AAA-AAAAAAA---------AA-
AAA------AAAAAAAAAAAAAA
------A----AAAA-----A-------
Using awk, I would need to replace only the "-" located between the last letter and the end of the string by "~"
in order to get:
--AAA-AAAAAAA---------AA~... (7 Replies)
Friends,
I have more the thousand lines like this.
check.cloud1.port=342
check.cloud2.port=5456
check.cloud3.port-4564
But we need to transfer it to
_CHECK.CLOUD1.PORT_=342
_CHECK.CLOUD2.PORT_=5456
_CHECK.CLOUD3.PORT_=4564
Any one could pls help of this. Thanks in Advance
... (1 Reply)
Hi,
Need a help to replace a word if a pattern is found between the delimiters preferably using SED or AWK.
below is the sample file that iam dealing with, need to match pattern 'application' if found replace the whole word between the delimiters and also print the lines that don't match.... (1 Reply)
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
LEARN ABOUT CENTOS
igawk
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)