i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
Hi,
I am new to awk/nawk, needs help.
I want to merge the rows having emplid attribute same into a single row in the following file. In actual this kind of file will have around 50k rows.
Here is my input file
id|emplid|firstname|dep|lastname
1|001234|test|1001|1
2|002345|test|1032|2... (7 Replies)
Hi All,
I have the following file that has computer data for various pcs in my network...
Snap of the file is as follows
*******************************************************************************
Serial
123456
Computer IP Address
lo0:... (1 Reply)
Hi All,
I have an xml file with the below format.
<a>111</a><b>222</b><c>333<c><d><e>123</e><f>234</f><d><e>456</e><f>789</f>
output needed is
111,222,333,123,234
111,222,333,456,789
nawk 'BEGIN{FS="<|>"}
{print a,b,c,e,f
a=""
... (7 Replies)
Hi all,
I try to make a awk-script, which counts lines, summarized by pdf and xml.
So far it works, but for sorting reasons, I'd like to change the format from the field $1 from dd-mm-yyyy to yyyy-mm-dd.
This works find, but: split() and sprintf() prints its output (for no reason, the results... (2 Replies)
Looking for some help and usually when I do a search this site comes up. Hopefully someone can give me a little direction as to how to use one of these two commands to achieve what I'm trying to do.
What am I trying to do?
I need to take the time value in epoch format returned from the... (5 Replies)
Hi.. i am running nawk scripts on solaris system to get records of file1 not in file2 and find duplicate records in a while with the following scripts -compare
nawk 'NR==FNR{a++;next;} !a {print"line"FNR $0}' file1 file2duplicate - nawk '{a++}END{for(i in a){if(a-1)print i,a}}' file1in the middle... (12 Replies)
Hi,
I have a file where I need to change the date format on the nth field from DD-MM-YYYY to YYYY-MM-DD so I can accurately sort the record by dates
From regex - Use sed or awk to fix date format - Stack Overflow, I found an example using nawk.
Test run as below:
$: cat xyz.txt
A ... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT CENTOS
reset
RESET(7) PostgreSQL 9.2.7 Documentation RESET(7)NAME
RESET - restore the value of a run-time parameter to the default value
SYNOPSIS
RESET configuration_parameter
RESET ALL
DESCRIPTION
RESET restores run-time parameters to their default values. RESET is an alternative spelling for
SET configuration_parameter TO DEFAULT
Refer to SET(7) for details.
The default value is defined as the value that the parameter would have had, if no SET had ever been issued for it in the current session.
The actual source of this value might be a compiled-in default, the configuration file, command-line options, or per-database or per-user
default settings. This is subtly different from defining it as "the value that the parameter had at session start", because if the value
came from the configuration file, it will be reset to whatever is specified by the configuration file now. See Chapter 18, Server
Configuration, in the documentation for details.
The transactional behavior of RESET is the same as SET: its effects will be undone by transaction rollback.
PARAMETERS
configuration_parameter
Name of a settable run-time parameter. Available parameters are documented in Chapter 18, Server Configuration, in the documentation
and on the SET(7) reference page.
ALL
Resets all settable run-time parameters to default values.
EXAMPLES
Set the timezone configuration variable to its default value:
RESET timezone;
COMPATIBILITY
RESET is a PostgreSQL extension.
SEE ALSO SET(7), SHOW(7)PostgreSQL 9.2.7 2014-02-17 RESET(7)