Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
hi guys,
i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB
MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
this the file raw format:
Number of... (6 Replies)
hi i want to find the size of a folder and assign it to a variable and then compare if it is greater than 1 gb.
i am doin this script, but it is throwing error....
#!/bin/ksh
cd . | du -s | size = awk '{print $1}'
if size >= 112000
then
echo size high
fi
ERROR : (4 Replies)
Have built this script, the output is what I needed, but NR 6 is omitted. Why? Is it an error? I am using Gawk.
'{nr=$2;f = $1} END{for (i=1;i<=f;i++) if (nr != i) print i, nr }' input1.csv >output1.csvinput1.csv
1 9
3 5
4 1
7 6
8 5
10 6
output1.csv > with the missing line number 6. 6 is... (5 Replies)
Hi,
How to get correct field/column from autosys autorep command. I'm using GNU/Linux
I'm trying to get the difference of last end and last start and the status (ST).
In awk, i get the following excluding the heading part
$1 - jobname
$2 - Last Start date
$3 - Last Start time
$4 - Last... (1 Reply)
I'm trying to modify the script given in post 7 of the following thread: 146564-need-parse-jil-file-into-excel-file.html. (Sorry, can't post the URL as I don't have enough posts.)
The original script is as follows:
awk -F ' *_]*: *' 'BEGIN ... (9 Replies)
Hi Experts,
I am trying to get system output to capture inside awk , but not working:
Please advise if this is possible :
I am trying something like this but not working, the output is coming wrong:
echo "" | awk '{d=system ("date") ; print "Current date is:" , d }'
Thanks, (5 Replies)
Hi ,
In a directory i've the files in the following format
pay:year:mon:11789604
pay:year:mon:17675644
---
and i need to get 4th part of the above file name
so i used awk command in the below code
#!/bin/ksh
for test_data in pay*
do
txt_awk = awk -F':' '{print $4;}' $test_data
... (7 Replies)
Hi,
I have a following code in which I am unable to redirect to multiple files. Can anybody please help with some corrections
awk -F, '{ if ( substr($1,26,2)=="02" && substr($1,184,14)=="MTSCC_VALFIRST") {
array1++
array2++
array3++
}
else if (substr($1,26,2)=="03" &&... (4 Replies)
When I run the awk below, I get an error message
awk -v OFS='\t' '$(NF-1)=="Benign" || ($(NF-2) OFS $(NF-1))=="Likely Benign" {$(NF)=$(NF-2) OFS $(NF-1)} {print $0 }' input
awk: cmd. line:1: (FILENAME=VUS FNR=8) fatal: attempt to access field -1
input
Chr Start End Ref ... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT DEBIAN
condor_vacate
condor_vacate(1) General Commands Manual condor_vacate(1)Name
condor_vacate Vacate - jobs that are running on the specified hosts
Synopsis
condor_vacate [-help -version]
condor_vacate[-graceful-fast] [-debug] [-pool centralmanagerhostname[:portnumber]] [-name hostnamehostname-addr
"<a.b.c.d:port>""<a.b.c.d:port>"-constraint expression-all]
Description
condor_vacate causes Condor to checkpoint any running jobs on a set of machines and force the jobs to vacate the machine. The job(s)
remains in the submitting machine's job queue.
Given the (default) -gracefuloption, a job running under the standard universe will first produce a checkpoint and then the job will be
killed. Condor will then restart the job somewhere else, using the checkpoint to continue from where it left off. A job running under the
vanilla universe is killed, and Condor restarts the job from the beginning somewhere else. condor_vacatehas no effect on a machine with no
Condor job currently running.
There is generally no need for the user or administrator to explicitly run condor_vacate. Condor takes care of jobs in this way automati-
cally following the policies given in configuration files.
Options-help
Display usage information
-version
Display version information
-graceful
Inform the job to checkpoint, then soft-kill it.
-fast
Hard-kill jobs instead of checkpointing them
-debug
Causes debugging information to be sent to stderr , based on the value of the configuration variable TOOL_DEBUG
-pool centralmanagerhostname[:portnumber]
Specify a pool by giving the central manager's host name and an optional port number
-name hostname
Send the command to a machine identified by hostname
hostname
Send the command to a machine identified by hostname
-addr <a.b.c.d:port>
Send the command to a machine's master located at "<a.b.c.d:port>"
<a.b.c.d:port>
Send the command to a machine located at "<a.b.c.d:port>"
-constraint expression
Apply this command only to machines matching the given ClassAd expression
-all
Send the command to all machines in the pool
Exit Status
condor_vacatewill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.
Examples
To send a condor_vacate command to two named machines:
% condor_vacate robin cardinal
To send the condor_vacatecommand to a machine within a pool of machines other than the local pool, use the -pooloption. The argument is the
name of the central manager for the pool. Note that one or more machines within the pool must be specified as the targets for the command.
This command sends the command to a the single machine named cae17within the pool of machines that has condor.cae.wisc.eduas its central
manager:
% condor_vacate -pool condor.cae.wisc.edu -name cae17
Author
Condor Team, University of Wisconsin-Madison
Copyright
Copyright (C) 1990-2012 Condor Team, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
Licensed under the Apache License, Version 2.0.
See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu
September 2012 condor_vacate(1)