Hi
I have a file with a line like this, wich is read by an awk script :
Logical Name | Server Type | Server1 | DB1 | User1 | $PASSWORD | Serv2 |DB2 | User2 | $PASSWORD
Awk reads it fine, but...it doesnt interpret the variable $PASSWORD as I wish. How do I tell awk to substitute $PASSWORD... (3 Replies)
I want to print old and new values of some field in Awk script. This is wat I done!
Sample file is as follows
But the output I god is bit different
What must be the problem here?
I am using bash. (2 Replies)
Hi,
I have some files in metrica (assume a pre-defined format) which i need to process and have some values in a .csv file. The script that does this, part of which is:
procMetricaOMData()
{
host=$1
fileIN=$2
fileOUT=$3
$CATCMD $fileIN | \
awk -f... (4 Replies)
hi i am using the following awk code for some calculations:
awk '/,1,/' "$LINE" >> "$count".dat
awk '/,1,/ { i++ } END { print i }' "$count".dat
awk '{sum+=$3} END {print sum}' 1.spd > test
awk '{average=sum/i} END {print average}' 1.spd >> test
can i use a variable created in one... (12 Replies)
Hi all, I am new to the forum and Shell Script programming.
The problem is:
I need to do a script to search all system processes and show me hierarchical way the number of bytes occupied by each of the regions of the memory map of each process.
Today I got to show me the number of regions in... (3 Replies)
Using ksh to call a function which has awk script embedded.
It parses a long two element list file, filled with text numbers (I want column 2, beginning no sooner than line 45, that's the only known thing) . It's unknown where to start or end the data collection, dynamic variables will be used. ... (1 Reply)
I have a data file like this:
49960 1157 32390 1227 1268
31 8 21
12 115 18493 67
250 2 2 237704 369658
52 21 312 38 27746 3174
19 160 9 555 6337 6071
43 33
I want to separate the field to three groups, $1 and $2 are the first group, $3 and $4 are the second group, $5 and $6... (1 Reply)
I wrote a very simple script to understand how to call user-defined functions from within awk after reading this post.
function my_func_local {
echo "In func $1"
}
export -f my_func_local
echo $1 | awk -F"/" '{for (k=1;k<=NF;k++) {
if ($k == "a" ) {
system("my_local_func $k")
}
else{... (19 Replies)
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
LEARN ABOUT HPUX
merge
merge(1) General Commands Manual merge(1)NAME
merge - three-way file merge
SYNOPSIS
file1 file2 file3
DESCRIPTION
combines two files that are revisions of a single original file. The original file is file2, and the revised files are file1 and file3.
identifies all changes that lead from file2 to file3 and from file2 to file1, then deposits the merged text into file1. If the option is
used, the result goes to standard output instead of file1.
An overlap occurs if both file1 and file3 have changes in the same place. prints how many overlaps occurred, and includes both alterna-
tives in the result. The alternatives are delimited as follows:
lines in file1
lines in file3
If there are overlaps, edit the result in file1 and delete one of the alternatives.
This command is particularly useful for revision control, especially if file1 and file3 are the ends of two branches that have file2 as a
common ancestor.
EXAMPLES
A typical use for is as follows:
1. To merge an RCS branch into the trunk, first check out the three different versions from RCS (see co(1)) and rename them for
their revision numbers: 5.2, 5.11, and 5.2.3.3. File 5.2.3.3 is the end of an RCS branch that split off the trunk at file 5.2.
2. For this example, assume file 5.11 is the latest version on the trunk, and is also a revision of the "original" file, 5.2.
Merge the branch into the trunk with the command:
3. File 5.11 now contains all changes made on the branch and the trunk, and has markings in the file to show all overlapping
changes.
4. Edit file 5.11 to correct the overlaps, then use the command to check the file back in (see ci(1)).
WARNINGS
uses the ed(1) system editor. Therefore, the file size limits of ed(1) apply to
AUTHOR
was developed by Walter F. Tichy.
SEE ALSO diff3(1), diff(1), rcsmerge(1), co(1).
merge(1)