Hello all,
I'm trying to run a script of this format -
for i in $(cat <file>); do
grep $i <file1>|awk '{print $i, $1, $2}'
It's not working - does anyone know how this can be done?
Khoom (5 Replies)
Hello,
I have a file with 4 columns.
An arbitrary example is shown below:
a Tp 10 xyz
b Tq 8 abc
c Tp 99 pqr
d Tp 44 rst
e Tr 98 efg
Based on the values in col 2 and col 3, I will execute another program.
I have been running this:... (5 Replies)
Hi,
I'm new with this stuff, but I hope you can help me.
This is what I'm trying to do:
for id in $var; do
awk '{if ($1 == $id) print $2}' merg_data.dat > neigh.tmp
done
I need that for every "id", awk search the first column of the file merg_data.dat which contains "id" and... (3 Replies)
Hi all,
I have a load of files in the format e.g.
a_1.out
a_300.out
a_20.out
etc
I would like to numeric sort them in ascending order by the number in the file name,
then pass them into awk for manipulation. How do I do this? (8 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)
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)
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt
set feedback off
set heading off
select 114032 as c_1 from dual ;
EOF
for i in `cat sql_1.txt`
do
sh script_1.sh $i
Currently i am passing one column value to the single unix variable.
How can i pass the values from 2... (2 Replies)
Hi All,
I am new to AWK programming. I have the following for loop in my awk program.
cat printhtml.awk:
BEGIN
-------- <some code here>
END{
----------<some code here>
for(N=0; N<H; N++)
{
for(M=5; M<D; M++) print "\t" D "";
}
-----
}
... (2 Replies)
I have file called in in.txt contains with the below lines I want to display the lines between the value which I would be passing.
one
two
three
four
five
ten
six
seven
eight
Expected output if I have passed one and ten
two
three
four
five (8 Replies)
Discussion started by: mychbears
8 Replies
LEARN ABOUT CENTOS
slptool
SLPTOOL(1) User Commands SLPTOOL(1)NAME
slptool - SLP command line tool
SYNOPSIS
slptool [options] command-and-arguments
OPTIONS
options may be:
-v (or --version) displays the versions of slptool and OpenSLP.
-s (or --scope) followed by a comma-separated list of scopes.
-l (or --language) followed by a language tag.
-t (or --time) followed by a lifetime tag.
-i (or --interfaces) followed by a comma-separated list of interfaces.
-u (or --unicastifc) followed by a single interface.
command-and-arguments may be:
findsrvs service-type [filter]
findattrs url [attrids]
findsrvtypes [authority]
findscopes
register url [attrs]
deregister url
getproperty propertyname
EXAMPLES
slptool register service:myserv.x://myhost.com "(attr1=val1),(attr2=val2)"
slptool findsrvs service:myserv.x
slptool findsrvs service:myserv.x "(attr1=val1)"
slptool -i 10.77.13.240,192.168.250.240 findsrvs service:myserv.x
slptool -u 10.77.13.237 findsrvs service:myserv.x "(attr1=val1)"
slptool findattrs service:myserv.x://myhost.com
slptool findattrs service:myserv.x://myhost.com attr1
slptool -i 10.77.13.243 findattrs service:myserv.x://myhost.com attr1
slptool -u 10.77.13.237 findattrs service:myserv.x://myhost.com attr1
slptool deregister service:myserv.x://myhost.com
slptool getproperty net.slp.useScopes
slptool 2.0.beta2 May 2013 SLPTOOL(1)