Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Substr with % - extract numbers only Post 303035753 by vbe on Sunday 2nd of June 2019 05:31:16 AM
Old 06-02-2019
try the cmd tr:
Tried on my mac...
Code:
df -k | grep -v -i Filesystem | grep -v ":" | awk '{print $5}'| tr [%] [\12]


Last edited by vbe; 06-02-2019 at 06:59 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract numbers from a string and store in variables

Hi All, Is it possible in Unix shell script to extract numbers from a string containing ".", such as; 5.2.314 And store in variables so; var1 = 5 var2 = 2 var3 = 314 Thanks in advance for any help anyone can provide dave (6 Replies)
Discussion started by: davewg
6 Replies

2. Shell Programming and Scripting

Extract numbers below words with awk

Hi all, Please some help over here. I have a Sales.txt file containing info in blocks for every sold product in the pattern showed below (only for 2 products). NEW BLOCK SALE DATA PRODUCT SERIAL 79833269999 146701011945004 .Some other data .Some... (17 Replies)
Discussion started by: cgkmal
17 Replies

3. Shell Programming and Scripting

extract numbers from a word

Hi ppl, I am a bit lost on this...can some one assist. I know this can be down with awk or sed, but i cant get the exact syntax right. I need to only extract the numbers from a signle word ( eg abcd.123.xyz ) How can i extract 123 only ? Thanks (14 Replies)
Discussion started by: systemali
14 Replies

4. Shell Programming and Scripting

BASH. Need to extract some numbers and take the average

Hey all, I ran some simulations, of which the output is 100s of files. I've used grep to extract the vital information needed from the files. This has made my task somewhat easier. But I still need to perform some mathematical calculations (average and geometrical average) on the results of the... (9 Replies)
Discussion started by: slackjack
9 Replies

5. UNIX for Dummies Questions & Answers

Extract numbers from .txt file

I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!! The .txt file looks essentially like this... (5 Replies)
Discussion started by: eggali
5 Replies

6. Shell Programming and Scripting

awk extract certain digits from file with index substr

I would like to extract a digit from $0 starting 2,30 to 3,99 or 2.30 to 3.99 Can somebody fix this? awk --re-interval '{if($0 ~ /{1}{2}/) {print FILENAME, substr($0,index($0,/{1}{2}/) , 4)}}'input abcdefg sdlfkj 3,29 g. lasdfj alsdfjasl 2.86 gr. slkjds sldkd lskdjfsl sdfkj kdjlksj 3,34 g... (4 Replies)
Discussion started by: sdf
4 Replies

7. UNIX for Dummies Questions & Answers

Extract Numbers from a log file

Hi, I am trying to grep/extract the number list from this log file, can I get some help on this. I can grep the word 'href' to see the numbers, but it is resulting with the complete line. Content of my file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head>... (4 Replies)
Discussion started by: Sajjadmehdi
4 Replies

8. Shell Programming and Scripting

Extract numbers from file name-how to ?

Hello friends,I am new to Unix programming. how do I achieve the following in Unix shell script (I am running ksh on AIX) extract the number from name of file? My file format is like "LongFileName-1234.020614-221030.txt" now I want to extract value which is between (-) hyphen and (.) dot... (4 Replies)
Discussion started by: f150
4 Replies

9. Shell Programming and Scripting

How to use substr to extract character between two semicolon?

Dear folks Hello I have a data set which one of the column of this data set are string and I want to extract numbers which is between two ":". However, I know the substr command which will do this operation but my problem is the numbers between two ":" have different digits. this will make my... (11 Replies)
Discussion started by: sajmar
11 Replies

10. Shell Programming and Scripting

Substr/Instr in shell script or extract part of text

Hi, I need to extract part of a text to two variables text is "PL/SQL procedure successfully completed. ERROR ----------------------------------------------------------------- Test Error Message PLUSVAR ---------- 1" I want "Test Error Message" in one variable and "1" in another variable.... (11 Replies)
Discussion started by: vedavrath
11 Replies
I2M19058(1)							     GNU Info							       I2M19058(1)

NAME
ift-extract.info - ift-extract.info Built-in iSight firmware extractor and patcher ift-extract extract the Built-in iSight firmware from Apple driver and patch it to avoid some bugs in it. The firmware is then ready to get loaded into the chip using ift-load. * Menu: Finding the Apple driver: see "Driver" Command line options: see "Options" See also "Copying" 1 Finding the Apple driver ift-extract extract Built-in iSight firmware from Apple iSight driver. This driver is located at /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport on your Mac OS X root partition. There is several version of this driver depending on driver version or host architecture (PowerPC or x86). Thus, ift-extract must determine know the variant of the driver in order to properly extract the firmware. Any AppleUSBVideoSupport file starting with those shipped with iMac G5 iSight must work. If not, please report unknown AppleUSBVideoSupport at bugreport mail address with machine type and OS X version. 2 Command line options `-a' `--apple-driver' Apple driver filename where to extract the firmware. `-d' `--output-directory' The directory where to output the firmware. Defaults to /lib/firmware. `-f' `--output-filename' The output firmware name. Defaults to isight.fw `-?' `--help' Shows option help and quit. Since ift-extract defaults to output the firmware to /lib/firmware/isight.fw, ensure you have the right to do so. 3 Copying isight-firmware-tools is a project developped by A~Xtienne Bersac based on the work of Ronald S. Bultje, Johannes Berg and Ivan N. Zlatev. This manual has been written by A~Xtienne Bersac. Copyright (C) 2007 A~Xtienne Bersac <bersace@gmail.com> perl v5.14.2 2012-01-09 I2M19058(1)
All times are GMT -4. The time now is 02:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy