When my script deals with large input files like 22Gb or 18 GB the basic commands like sort or join fails when run from inside the shell scripts. Can there be any specific reason for this?
For e.g.
sort -u -t "," -k1,1 a.csv > a.csv.uniq"
sort -u -t "," -k1,1 b.csv > b.csv.uniq"
The first sort fails in the midway and begins the sort on the b.csv without throwing any error.
When run from the command line they run perfectly..they are giving me a problem only when they are run from a shell script. Does the HUGE file size has anything to do with this??
thats because there is not enough space in /var/tmp area as sort by default sort uses /var/tmp area
mention directory where you have more than 22GB area with sort command
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Hi,
In sed, is it possible to match patterns by directly executing UNIX commands inside sed?
For e.g. -
sed "s/`cat file.txt | cut -d "|" -f2`/replace_string"
Will the above command work?
My expectation is to search for the second field in file.txt (file delimited by | ) and replace... (10 Replies)
Dears,
I'm new in shell scripting and i need your help, i would like to know how can i create a script to ftp to a certain unix/linux machine/server IP address and get a file for example without user intervention? How can i force the script to use a certain username and password to access this... (4 Replies)
I have a reqirement to serialise various rsh scripts that hit my server from an external scheduler. No matter how many scripts come via rsh, only one should execute at a time and others should wait.
I have made the scheduler make a request to my shell script with the command to be run as a... (4 Replies)
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Hi Folks,
I have a text file which may or may not have any data.
I would like to email the file, via a Korn shell script, if the file is not empty.
I am fiddling around with the wc -l command, but no luck so far. The pseudo code is as follows
count=`wc -l test.txt`
if
cat test.txt... (4 Replies)
Hi,
does any one know the environmental parameter that I have to set so as to make sure the file operations run properly within the script.
right now when I am doing a cat from within the script nothing happens, same is the case when I do a grep. when I am doing awk '{print $0 }' its printing... (1 Reply)
Hello
I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that:
#!/bin/ksh
echo "Start ....."
rman target=/ << EOF
RUN {
delete force noprompt archivelog until time 'sysdate-10';
}
EXIT;
EOF
echo "END ..."
echo... (6 Replies)
Hi,
I wrote a simple script, which will call other scripts or run commands on a UNIX server. my script has multiple steps/commands with some delay in between.
I usually get some email notifications after the successful execution of each step.
**My intention is to get email alerts when it is... (5 Replies)
Hi
I have a program
int main(int srgc, char *argv)
{
for(int i=1; i<50; i++)
{
system("dd if=/dev/zero of=file$i bs=1024 count=$i");
}
return 0;
}
My doubt is how to use the "$i" value inside C code
Please help (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
LEARN ABOUT CENTOS
processcsv.py
PROCESSCSV.PY(1) Virtualization Support PROCESSCSV.PY(1)NAME
processcsv.py - process virt-top CSV files
SUMMARY
virt-top --csv data.csv
processcsv.py < data.csv
DESCRIPTION
virt-top is a top(1)-like utility for showing stats of virtualized domains.
processcsv.py is a simple Python script that post-processes the output of "virt-top --csv".
It is used like this:
virt-top --csv data.csv
processcsv.py < data.csv
The second command will overwrite the following files in the current directory:
"global.csv"
This contains the global (host) statistics columns from the CSV file.
"domainNN.csv" (multiple files)
For each libvirt domain ID NN, a file is created containing the per-domain statistics from the CSV file.
SEE ALSO virt-top(1)AUTHORS
Richard W.M. Jones <rjones @ redhat . com>
COPYRIGHT
(C) Copyright 2007-2012 Red Hat Inc., Richard W.M. Jones http://libvirt.org/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
virt-top-1.0.8 2013-12-29 PROCESSCSV.PY(1)