03-14-2009
Quote:
Originally Posted by
Rahulpict
[B][COLOR=Blue]sort -r -k3,3n
- doesn't work either....
rather gives wrong result....
check below....
As I look at the post, I see that you changed the data when you tried my sort suggestion. The new data that you used resulted in a a bunch of zeros. But help me out. Which one of those identical zeros do you think is out of order?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i have two rules in my pf.conf file, "pass in all" and "pass out all"
i was having issues with getting pf working to begin with, so i went with
starting from nothing and working on up.
i have an ultrasparc ultra1 200e, with an added 4-port fast ethernet sbus
card, running "3.4 GENERIC#85... (4 Replies)
Discussion started by: xyyz
4 Replies
2. Shell Programming and Scripting
Hi Everyone ,
I am facing a strange problem
i have made the follwing script to watch a appending log file (abc.log) but its not moving after the line tail -f ,
any suggestions
=====================================
#!/bin/bash
while true
do
tail -f abc.log | grep "exceptions"
echo hi... (12 Replies)
Discussion started by: xander
12 Replies
3. Shell Programming and Scripting
Hi All,
I am not much strong in shell scripting...
I am using sed command in my script to find and replace a string.......
This is how script looks :
#############
#!/usr/bin/ksh
CONFIG_FILE=iom_test.txt
FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"`
REPLACE=`echo... (2 Replies)
Discussion started by: askumarece
2 Replies
4. Shell Programming and Scripting
Hello everybody,
I've gotten a script together that is designed to open a .bin file and read it 32 bits at a time and then add it to the checksum. However, the only issue that I have is that it will not print anything at the end. Can anyone help me? Also, is the & symbol used for restraining... (2 Replies)
Discussion started by: TeamUSA
2 Replies
5. Shell Programming and Scripting
Hi, this is my script:
#!/bin/bash
trabajo=$1
numero=`jobs | grep -n $trabajo | cut -d':' -f1`
echo $trabajo
echo $numero
kill %$numero
wait
For some reason,
numero=`jobs | grep -n $trabajo | cut -d':' -f1`
that line wont save in numero the number I am looking for BUT if I write it... (7 Replies)
Discussion started by: lamachejo
7 Replies
6. Shell Programming and Scripting
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies
7. Shell Programming and Scripting
Platform: RHEL 5.4
In the below text file I have strings like following.
$ cat /tmp/mytextfile.txt
DISK1
DISK10
DISK101
DISK102
DISK103
DISK104
DISK105
DISK106
DISK107
DISK108
DISK109
DISK110
DISK111
DISK112
DISK113
DISK114 (8 Replies)
Discussion started by: kraljic
8 Replies
8. Shell Programming and Scripting
I am facing this weird issue where the script is working fine from the command line but when I am executing it from cron though it is working fine but the "if" loop is processing else part though I know that the if part of the logic is true and ideally the loop should execute the if portion.
... (3 Replies)
Discussion started by: sk2code
3 Replies
9. UNIX for Beginners Questions & Answers
#!/bin/bash -i
SAVEIFS=$IFS
IFS=$"\n\b"
picc=$*
if ; then
echo $TDATE
if ; then
touch dummy
touch -t "tdate" dummy
touch -r "dummy" "$picc"
else
echo -e "No mod date value to apply. If there is one in your shell,\ninvoke \eStarted asking advice on this (on Linuxquestions.org).... (9 Replies)
Discussion started by: iamwrong
9 Replies
10. UNIX for Beginners Questions & Answers
"SQLPLUS -S " is not working in one environment where same code is working in another
getting below error
===================================
SQL*Plus: Release 11.2.0.3.0 Production
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus... (1 Reply)
Discussion started by: yogendra.barode
1 Replies
LEARN ABOUT DEBIAN
rfio_statfs
RFIO_STATFS(3) Rfio Library Functions RFIO_STATFS(3)
NAME
rfio_statfs - get information about a mounted filesystem
SYNOPSIS
#include <sys/types.h>
#include "rfio_api.h"
int rfio_statfs (const char *path, struct rfstatfs *statfsbuf);
Under Linux, for large files:
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
#include "rfio_api.h"
int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);
For large files, under other systems:
#include <sys/types.h>
#include "rfio_api.h"
int rfio_statfs64 (const char *path, struct rfstatfs64 *statfsbuf);
DESCRIPTION
rfio_statfs gets information about a mounted filesystem.
path specifies the logical pathname relative to the current directory or the full pathname of any file in this filesystem.
statfsbuf
is a pointer to a rfstatfs structure:
struct rfstatfs {
long totblks ; /* Total number of blocks */
long freeblks ; /* Number of free blocks */
long bsize ; /* Block size */
long totnods ; /* Total number of inodes */
long freenods ; /* Number of free inodes */
};
struct rfstatfs64 {
signed64 totblks ; /* Total number of blocks */
signed64 freeblks ; /* Number of free blocks */
long bsize ; /* Block size */
signed64 totnods ; /* Total number of inodes */
signed64 freenods ; /* Number of free inodes */
};
The 64 bits function must be used for large filesystems. It has the same syntax as the normal statfs function except that it uses a rfs-
tatfs64 structure.
RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
ERRORS
ENOENT The named file/directory does not exist or is a null pathname.
EACCES Search permission is denied on a component of the path prefix.
EFAULT path or statfsbuf is a NULL pointer.
ENOTDIR A component of path prefix is not a directory.
ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of a path component exceeds CA_MAXNAMELEN.
SENOSHOST Host unknown.
SENOSSERV Service unknown.
SECOMERR Communication error.
SEE ALSO
Castor_limits(4)
AUTHOR
LCG Grid Deployment Team
LCG
$Date: 2005/09/20 12:07:09 $ RFIO_STATFS(3)