Sponsored Content
Top Forums Shell Programming and Scripting Sed only digits not in numbers Post 302564023 by jejeking on Wednesday 12th of October 2011 03:23:50 PM
Old 10-12-2011
Thanks Radoulov!

The first one worked!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed: removing any and all trailing digits?

We have a large number of oracle database related scripts that utilize the environment variables $ORACLE_SID and $DBNAME. In a single instance database the $ORACLE_SID is the same as the database name $DBNAME. So we have simply set DBNAME = $ORACLE_SID. However, now that we are clustering with RAC,... (5 Replies)
Discussion started by: Squeakygoose
5 Replies

2. Shell Programming and Scripting

help: single digits inflated to 2 digits

Hi Folks Probably an easy one here but how do I get a sequence to get used as mentioned. For example in the following I want to automatically create files that have a 2 digit number at the end of their names: m@pyhead:~$ for x in $(seq 00 10); do touch file_$x; done m@pyhead:~$ ls file*... (2 Replies)
Discussion started by: amadain
2 Replies

3. Shell Programming and Scripting

stripping out digits from a string with sed

i want to parse a string and only display the digits in that string... How would i accomplish this with sed command. For example. input string: " 033434343 dafasdf" output string: 03343434 Thanks (2 Replies)
Discussion started by: timmylita
2 Replies

4. Shell Programming and Scripting

Find filenames with three digits and add zeros to make five digits

Hello all! I've looked all over the internet and this site and have come up a loss with an easy way to make a bash script to do what I want to do. I have a file with a naming convention as follows: 2012-01-18 string of words here 123.jpg 2012-01-18 string of words here 1234.jpg 2012-01-18... (2 Replies)
Discussion started by: Buzzman25
2 Replies

5. Shell Programming and Scripting

Regex - Return numbers of exactly 8 digits

Hi All I am new to this forum and also regex. I am using bash scripting and have a file like this "0012","efgh","12345678","adfdf", "36598745" "87654321","hijk","lmno" I want the ouput to be 12345678 36598745 87654321 Criteria like this - number - 8 carachters long Please let... (21 Replies)
Discussion started by: buttseire
21 Replies

6. UNIX for Dummies Questions & Answers

Grep lines with numbers greater than 2 digits at the end of the line

I'm trying to grep lines where the digits at the end of each line are greater than digits. Tried this but it will only allow me to specify 2 digits. Any ideas would greatly be appreciated. grep -i '\<\{3,4,5\}\>' file ---------- Post updated at 05:58 PM ---------- Previous update was at 05:41... (1 Reply)
Discussion started by: jimmyf
1 Replies

7. UNIX for Dummies Questions & Answers

Replacing digits using sed

How to replace a character followed by a digit using sed? For example lets say I have this file - a1 3242134 54235435 3241235 a2 3214345 45325626 3125435 a3 4236577 54365376 6865678 . . . a3000 5432534 32546546 3254365 I want to replace all... (6 Replies)
Discussion started by: saleheen
6 Replies

8. UNIX for Dummies Questions & Answers

Determine if first 2 digits of string match numbers

Trying to find out how to discover if the first 2 characters of a string are "22" Not sure how. I could use if ]; then echo "yes";fi But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Discussion started by: newbie2010
5 Replies

9. UNIX for Beginners Questions & Answers

Using sed or awk to replace digits in files

Hello; I am not good at file and stream editing. I need to replace a few digits in two files. The lines in files looks like this: Line in the first file, /dw300/data/obe/2019273.L800JR.1909.273 Line in second file, 1|2019273.L800JR.1909.273 I will write a function to connect to... (7 Replies)
Discussion started by: duke0001
7 Replies

10. UNIX for Beginners Questions & Answers

sed / awk script to delete the two digits from first 3 digits

Hi All , I am having an input file as stated below 5728 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r03_q_reg_20_/Q 011 611 U_TOP_LOGIC/U_CM0P/core/u_cortexm0plus/u_top/u_sys/u_core/r04_q_reg_20_/Q 011 3486... (4 Replies)
Discussion started by: kshitij
4 Replies
httpdstat.d(1m) 						   USER COMMANDS						   httpdstat.d(1m)

NAME
httpdstat.d - realtime httpd statistics. Uses DTrace. SYNOPSIS
httpdstat.d [interval [count]] DESCRIPTION
This prints connection statistics for "httpd" processes, such as those from an Apache web server. Since this uses DTrace, only users with root privileges can run this command. EXAMPLES
Print statistics every second, # httpdstat.d Print every 5 seconds, 6 times, # httpdstat.d 5 6 FIELDS
TIME time, string NUM number of connections GET number of GETs POST number of POSTs HEAD number of HEADs TRACE number of TRACEs NOTES
All statistics are printed as a value per interval. This version does not process subsequent operations on keepalives. IDEA
Ryan Matteson (who first wrote a solution to this). DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver- bose descriptions explaining the output. EXIT
httpdstat.d will run until Ctrl-C is hit. AUTHOR
Brendan Gregg [Sydney, Australia] SEE ALSO
dtrace(1M) version 0.70 Nov 20, 2005 httpdstat.d(1m)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy