I'm trying to get the universities result data into different file, where the $9 contains unversity field and field7,4 & 5 contains the keys to sort the students by marks. How to use uni variable to match against $9 inside awk?
Thanks for the help!
i need help with an awk question. i am looking to have an external variable be defined outside of awk but used in awk. so if we have fields $1, $2, $3 so on and so forth, i would like to be able to dictate what field is being printed by something like $. so if i had a counter called test, make it 3... (8 Replies)
So I have a if statement inside an awk to check if $2 of a awk equals a specific IP but the test fails. So here is what I have.
# !/bin/sh
echo "Enter client ID"
read ID
echo "Enter month (01, 02, 03)"
read month
echo "Enter day (03, 15)"
read day
echo "Enter Year (07, 08)"
read... (6 Replies)
Dear all,
¿How can i insert a variable in a AWK pattern?
I have almost succeeded in solving a puzzle with AWK but now i want to make a script. Let me explain.
cat file.txt | awk 'BEGIN {RS="\\n\\n"} /tux/ { print "\n"$0 }'
I know that this command makes right what i want to do, but mi... (8 Replies)
Hello,
I have external variable rownumber, I am processing files within a loop and I would like to keep incrementing rownumber. What is happening is inside nawk section it passes rownumber but it never gets updated. I want to update rownumber inside the nawk, I would appreciate your help
... (6 Replies)
Hello,
I am running a bash script under linux which first defines an CA-array like
j=0
num1=120.00
num2=10.00
until
do
CA='echo $num1 + $j*$num2'
j=$
done
within the later awk section of this same script I want to read data from a file. If the value of the second column is... (3 Replies)
I want to incorporate the variable in the for statement as a column of my processed file. In the INCORRECT example below, it is $i which corresponds to the i in my for loop:
for i in x86_64 i686; do
awk '{ print $1" "$4" "$5" "$i }'awk $file-$i > processed-$i.log
doneThanks! (3 Replies)
is it possible to assign value to an array variable from an external file?? if yes then how??
I am using below code but its not working.
#!bin/bash
myarray < file_name
echo ${mayarray} (6 Replies)
Hi,
How can I modify the FILETYPE command ?
I want to provide the file extension, like txt, root .?
Thanks,
#!/bin/bash
FROM=$1
TO=$2
FILETYPE=$3
... (4 Replies)
Hi,
I am trying to write a bash script in which I need to pass a external variable to the awk program. I tired using -v but it not accepting the value.
Here is my sample code.
#!/usr/bin/bash
######################################################################################
####... (5 Replies)
So, I've been playing with speeding up some analysis we do by using multiple threads of awk (actually, mawk, but code-compatible as far as I use it) on multiple CPU cores. So, I have a big data file and I have several copies of exactly the same processor script, written in mawk. I also have a... (8 Replies)
Discussion started by: treesloth
8 Replies
LEARN ABOUT SUSE
uni
UNI(8) System Manager's Manual UNI(8)NAME
uni - a program to interface with the UniConf configuration system
SYNOPSIS
uni get KEY [DEFAULT]
uni set KEY [VALUE]
uni xset KEY [VALUE]
uni keys KEY
uni hkeys KEY
uni xkeys KEY
uni dump KEY
uni hdump KEY
uni xdump KEY
DESCRIPTION
UniConf is the One True Configuration system that includes all the others because it has plugin backends and frontends. Or, less
grandiosely, it's a lightweight, distributed, cacheable tree of strings.
uni is used to interface directly with the UniConf system. It's primary use is for diagnostic purposes, but it can be used to add UniConf
support to shell scripts.
ENVIRONMENT VARIABLE
UNICONF
Before using uni, you must tell it which UniConf moinker you wish to query by setting this environment variable.
Monikers are used to contact UniConf back-ends, be they a uniconfd server, or a local file. For example, they could be:
o a filename (ini:/var/lib/app/config.ini),
o or a network address, (tcp:open.nit.ca:4111).
COMMANDS
get Retreive the VALUE associated with the provided KEY within the UniConf database. If a DEFAULT is provided, this will be returned if
the KEY has no associated VALUE.
set Assign the provided VALUE the the provided KEY. UniConf provides no guarentee that the entry committed throughout the database.
The next "get" command for this KEY may not return the most recently "set" value due to caching, or the existance of a read-only
generator.
xset Assign, to the provided KEY, the contents of the standard-input stream. Use this command to pipe information into the UniConf data-
base.
keys List all the sub-keys contained within the provided KEY.
hkeys List all the sub-keys, recursively, contained within the provided KEY. Since any KEY may contain sub-keys, UniConf provides no
guarentee that there are no circular references.
xkeys List all the sub-keys contained within the provided KEY, which can contain wildcards. See the WILDCARDS section.
dump List all the sub-keys and their values, contained within the provided KEY.
hdump List all the sub-keys and their values, recursively, contained within the provided KEY.
xdump List all the sub-keys and their values, contained within the provided KEY, which can contain wildcards.
WILDCARDS
A KEY looks just like a normal slash-delimited path. The root of the UniConf tree has a KEY named "/". Sub-keys can be accessed by names
such as "/software/myapp/version".
With wildcards, you can access more than one key at a time.
* To access a sub-key within any one level of keys, use the asterix like so: "/software/*/version". This retrieves all keys of "ver-
sion" that are one level beneath "/software".
... To access a sub-key anywhere beneath a key, use the ellipsis like so: "/.../version". This retrieves all keys of "version" that are
zero or more levels beneath the root (i.e. any appearance of "version" within the database.
SEE ALSO uniconfd(8)AUTHORS
This software was written by the hackers at Net Integration Technologies. Contact us at <wvstreams-dev@lists.nit.ca>
Uni 4.4.1 September 2004 UNI(8)