But i want to get only numeric value i.e. whenever it encounter space , it should remove spaces and watever is after spaces so that i can get onl;y numeric part. My o/p should be like below
I know we can do it by SED and we have to implement this in a2=`du -sk $b` . I tried some commands with sed
,but not successfull
a2=`du -sk $b | `sed 's/ //g'-----> not working
I m pretty much sure we have to implement the logic in that part of the script i.e. a2=`du -sk $b` and using SED but not getting the correct way to use SED
Plz help me in this
Last edited by Franklin52; 09-17-2008 at 06:13 AM..
Reason: adding code tags
Hello all,
I am working on a basic script but need a little help.
Issue:
I am running a SQL Query using sqlplus and a shell script. I have the output of the statement stored as variable $A. $A is set to "other text here 45678754 other text here". I need to strip all text except that numeric... (13 Replies)
Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is:
1702938475,SNU022,201004
the first 10 numbers always begin with 170 (6 Replies)
HI,
can any one help me please ..
i have flat file like
qwer123rt ass3242ccf jjk654
kjh838ppp nhdg453ok hdkk34
i want remove numeric characters in the flat file
i want output like this
qwerrt assccf jjk
kjhppp nhdgok hdkk
help me... (4 Replies)
I have file1.txt
LBP298W2,300,-18,-115,-12,-105
LBP298W2,300,-18,-115,LBP298W3,300
LBP298W3,300,-18,-115,-12,-105---------- Post updated at 03:35 AM ---------- Previous update was at 03:34 AM ----------
i want to remove every line with non numeric value in column 5
expected result
... (4 Replies)
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Hello,
I need help. I have xml file and there are one extra space on number <EpiReference>1 42345</EpiReference>. And of cource, the value change on every new file. I need remove space from that value what is in between <EpiReference> and </EpiReference>. How I can do that?
This are example... (9 Replies)
Hi,
i have a file with multiple entries. After some tests with sed i managed to get the file output as follows:
lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1,
00,2110597,2094790,0,81,529,75649011,56435363,
lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
LEARN ABOUT HPUX
fs_diskfree
FS_DISKFREE(1) AFS Command Reference FS_DISKFREE(1)NAME
fs_diskfree - Shows data about the partition housing a directory or file
SYNOPSIS
fs diskfree [-path <dir/file path>+] [-human] [-help]
fs df [-p <dir/file path>+] [-hu] [-he]
fs di [-p <dir/file path>+] [-hu] [-he]
DESCRIPTION
The fs diskfree command formats and displays information about the partition that houses the volume containing the specified directory or
file, including its size and how much space is currently used.
To display information about the volume itself, use the fs examine command. The fs examine and fs quota commands also display information
about a volume.
CAUTIONS
The partition-related statistics in this command's output do not always agree with the corresponding values in the output of the standard
UNIX df command. The statistics reported by this command can be up to five minutes old, because the Cache Manager polls the File Server for
partition information at that frequency. Also, on some operating systems, the df command's report of partition size includes reserved space
not included in this command's calculation, and so is likely to be about 10% larger.
OPTIONS -path <dir/file path>+
Names a file or directory that resides on the partition about which to produce output. Partial pathnames are interpreted relative to
the current working directory, which is also the default value if this argument is omitted.
-human
Print space in a "human-readable" format. Instead of always printing space in kilobytes, show disk space in kilobytes, megabytes,
gigabytes, terabytes, or petabytes, as appropriate.
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
The output reports the following information about the volume and partition that houses each file or directory:
Volume Name
The name of the volume.
total
The partition's total size. If -human is not specified, this value is in kilobytes.
used
The amount of space used on the partition. If -human is not specified, this value is in kilobytes.
avail
The amount of space available on the partition. If -human is not specified, this value is in kilobytes.
%used
The percentage of the partition's total space that is used (the "used" statistic divided by the "kbytes" statistic, times 100).
If the %used statistic is greater than 90%, it is marked with the string "<<WARNING" at the right margin.
If the volume is a read-only volume, the output includes information about only one of the partitions that houses it, generally the one on
the file server machine with the lowest preference rank. To verify which machine the output is referring to, use the vos listvldb command
to list the volume's locations, and the vos partinfo command to display the size of each one.
EXAMPLES
The following example shows the output for the partitions housing the volumes "user.smith" and "sun4x_56.bin":
% fs diskfree -path /afs/abc.com/usr/smith /afs/abc.com/sun4x_56/bin
Volume Name total used avail %used
user.smith 4177920 3841258 336662 92% <<WARNING
sun4x_56.bin 4423680 3174500 1249180 72%
PRIVILEGE REQUIRED
The issuer must have the "r" (read) permission on the ACL of the root directory of the volume that houses the file or directory named by
the -path argument, and "l" (list) permission on the ACL of each directory that precedes it in the pathname.
SEE ALSO fs_examine(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 FS_DISKFREE(1)