Hi All,
How can i use the file for printing in awk
file1
----------
update table crn_ras_disc_dtl a set a.a5=$1,a.a1=$2,a.a2=$3,a.a3=$4,a.a4=$5;
file2
--------
10|KUMAR|23|MALE|US
20|RAJ|24|MALE|AU
Output
---------
update table crn_ras_disc_dtl a set... (12 Replies)
line_no=6
echo 'Phone,' `awk 'NR==$line_no{print;exit}' <filename>`
what is the error in this..
it says..
awk: Field $() is not correct.
The input line number is 1. The file is <filename>.
The source line number is 1.
i want to print the data in the $line_no line of a certain... (2 Replies)
I'm a bit stuck in getting variable from awk to shell. I tried searching but most of them showing to assign to shell variable via..
VAR=`echo $line | awk -F: '{print $1}'`
which is correct ofcourse
My problem is multiple assignments of variable like this one. The above solution will give... (10 Replies)
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
In awk script,
#!/bin/sh
awk 'BEGIN{i=0;}{i=i+5;}END{print i}' in.txt
vr=0;
vr=$i;
echo "$vr"
How can i assign that value of i in $vr(variable) of shell script? (7 Replies)
Trying to do something like this
ls -lrt | awk '$9=="test5"'
-rw-r--r-- 1 lrmq db2iadm1 381 Sep 20 21:56 test5
But now, I need to give a variable in place of test5. For example let's define x as test5
x=test5
ls -lrt | awk '$9=="$x"'
This doesn't seem to be working. It doesn't take the... (4 Replies)
How do you use a shell variable in awk? I am using Solaris 10 and don't have GNU products installed.
File (transportation.txt) contents:
car
boat
airplane
snowmobile
bicycle
sled
This awk statment works (prints from the car line down to bicycle
awk '/car/,/bicycle/'... (8 Replies)
I am reasonably capable with awk and its quirks, but not with shell weirdness. This has to be Bourne Shell for portability reasons. I have an awk program that is working just fine; it handles multiple input streams and produces several reports, based on the request (-v Variables). In addition... (3 Replies)
I want to split one file input.tab into two separate ones, odd lines to input_reads1.txt, even lines to input_reads2.txt for a serial of files with similar name pattern. Also I want to "match" input/output file names to keep consistency of file name:
CSEL_02.0_input.tab
CSEL_03.4_input.tab... (2 Replies)
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
LEARN ABOUT DEBIAN
sdpa
SDPA(1) General Commands Manual SDPA(1)NAME
SDPA - High-performance software package for SemiDefinite Programs
SYNOPSIS
sdpa DataFile OutputFile [InitialPtFile] [-pt parameters] [-dimacs] [-numThreads numThreads]
sdpa [options] files...
sdpa --version
DESCRIPTION
sdpa - "SDPA (SemiDefinite Programming Algorithm)" is one of the most efficient and stable software packages for solving SDPs based on the
primal-dual interior-point method.
SDP (SemiDefinite Program) is used for financial engineering, machine learning, control theory, sensor network problem, quantum chemistry,
quantum information, combinatorial optimizaiton, polynomial optimization, and so on.
Futher information on SDP and SDPA can be found at
http://sdpa.sourceforge.net/
OPTIONS ---- option type 1 ----
sdpa DataFile OutputFile [InitialPtFile] [-pt parameters] [-dimacs] [-numThreads numThreads]
parameters = 0 default, 1 fast (unstable), 2 slow (stable)
example1-1: sdpa example1.dat example1.result
example1-2: sdpa example1.dat-s example1.result
example1-3: sdpa example1.dat example1.result example1.ini
example1-4: sdpa example1.dat example1.result -pt 2
example1-5: sdpa example1.dat example1.result -dimacs
example1-6: sdpa example1.dat example1.result -numThreads 4
---- option type 2 ----
sdpa [option filename]+
-dd : data dense :: -ds : data sparse
-id : init dense :: -is : init sparse
-o : output :: -p : parameter
-pt : parameters , 0 default, 1 fast (unstable)
2 slow (stable)
example2-1: sdpa -o example1.result -dd example1.dat
example2-2: sdpa -ds example1.dat-s -o example1.result -p param.sdpa
example2-3: sdpa -ds example1.dat-s -o example1.result -pt 2
example2-4: sdpa -ds example1.dat-s -o example1.result -dimacs
example2-5: sdpa -ds example1.dat-s -o example1.result -numThreads 4
---- option type 3 ----
sdpa --version
to print out version and exit.
PARAMETER_FILE
is decided by the following priority
1: The file assigned by '-p' option of 'option type 2'.
For 'option type1', this is skipped.
2: ./param.sdpa
For 'option type2', this is skipped.
3: /usr/share/sdpa/param.sdpa
4: Default parameter
-dimacs
printout dimacs information incurring additional computation cost
-numThreads
number of pthreads for internal computation
AUTHOR
SDPA was written by SDPA Project <sdpa-developers@lists.sourceforge.net>.
This manual page was written by Makoto Yamashita <Makoto.Yamashita@is.titech.ac.jp>.
July 28, 2011 SDPA(1)