Sponsored Content
Homework and Emergencies Homework & Coursework Questions Sed, matching nested brackets and deleting Post 302784291 by hanson44 on Friday 22nd of March 2013 12:44:21 AM
Old 03-22-2013
First, post the solution where you can delete the first pair of brackets and see if you got that logic right.

Once you get that logic right, you can figure out how to delete the other ones.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

deleting files and folders matching criteria

Hello, I'm spendind hours trying to figure out how a script could remove files and folders older than 30days in a given volume (/dataVolumes/Booba.1.0). Within this volume, all users have their personal folder that starts with "RC-..", so the script should skip them for deletion. I will... (4 Replies)
Discussion started by: H3001
4 Replies

2. Shell Programming and Scripting

Deleting part of a string enclosed in brackets

I use otool on OS X to figure out the shared libraries that a binary uses. I run this command: otool -L /Applications/Vidnik\ 0.13.0/Vidnik.app/Contents/MacOS/Vidnik And it returns an output similar to this: /Applications/Vidnik 0.13.0/Vidnik.app/Contents/MacOS/Vidnik:... (10 Replies)
Discussion started by: pcwiz
10 Replies

3. Shell Programming and Scripting

strip the square brackets from a word using sed or var expansion

Hi, I am trying to strip out leading and trailing brackets from a word. for example, I have a value, in a file. I want to strip out the leading and trailing brackets it and should get the value Running. I am using the following statement but in vain. grep "Workflow run status:" <... (4 Replies)
Discussion started by: svajhala
4 Replies

4. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

5. Shell Programming and Scripting

Regex/egrep matching numbers in brackets

Experts: I don't know that regular expressions will ever be easy for me, so if one of you guru's could help out, I'd appreciate it. I'm trying to match a line in our syslog, but I can't figure out how to match a number inside a bracket. This is what I'm trying to match. "Jul 16 00:01:34... (2 Replies)
Discussion started by: jdveencamp
2 Replies

6. Shell Programming and Scripting

Deleting lines from a stream after matching a pattern

Hi, I have a requirement to to an ldapsearch and remove the shadow attributes in the output file. What I do is ldapsearch() | operation to remove shadow > FILE The ldapsearch gives output like this(with same line formation): objectClass: FSConfig objectClass: extensibleObject fsCAIP:... (10 Replies)
Discussion started by: lorzinian
10 Replies

7. Shell Programming and Scripting

Deleting a matching string(line) which is also in other lines

Hi, i need help with my shell script I have a file input.txt containing the following contents /. /usr /usr/share /usr/share/doc /usr/share/doc/wine /usr/share/doc/wine/copyright /usr/share/doc/wine/changelog.Debian.gz I need output as /usr/share/doc/wine /usr/share/doc/wine/copyright... (3 Replies)
Discussion started by: Amit0991
3 Replies

8. Shell Programming and Scripting

sed should cut of everything include the brackets

Hi there! sed should cut of everything include the brackets ... 443,0.806362,0.67317,1.46563,14.8237(#/cm�) ... 5112,0.812411,0.67317,1.4831,14.1875(#/cm�) it should be ... 443,0.806362,0.67317,1.46563,14.8237 ... 5112,0.812411,0.67317,1.4831,14.1875 i try it several times with ...... (4 Replies)
Discussion started by: IMPe
4 Replies

9. Shell Programming and Scripting

Adding a backslash in front of square brackets with sed

I'm trying to convert this line: to \ with sed. This is what I have so far: sed -e 's/\]*\)\]/\\\\\/' but this still gives me . Any suggestions? (15 Replies)
Discussion started by: lehaste
15 Replies

10. Shell Programming and Scripting

Deleting lines on matching certain pattern

hi I have a large xml file from which i have taken few lines . In this file I have to find for the string </invoices> and check if the 3 rd line after this string does not begin with <portCode> ,then i have to delete the string </invoices> and the next line having the string </shippingBill>... (13 Replies)
Discussion started by: sunnyboy
13 Replies
TRICKLED.CONF(5)					      BSD File Formats Manual						  TRICKLED.CONF(5)

NAME
trickled.conf -- format of the configuration file used by trickled(8). DESCRIPTION
The configuration file format is quite simple. Sections are delimited by square brackets: [Section] And options within brackets sections are simple key value pairs: Option = Value OPTIONS
Per-application customizable variables are specified within sections with section names matching the application name. The options are: Priority Sets the priority of the application, see trickled(8) for details. Time-Smoothing Sets the time smoothing parameter of the application, see trickled(8) for an details. Length-Smoothing Sets the length smoothing parameter of the application, see trickled(8) for details. EXAMPLES
[ssh] Priority = 1 Time-Smoothing = 0.1 Length-Smoothing = 2 [ftp] Priority = 8 Time-Smoothing = 5 Length-Smoothing = 20 SEE ALSO
trickle(1), syslog(3), netintro(4) AUTHORS
trickled.conf has been developed by Marius Aamodt Eriksen <marius@monkey.org>. BSD
March 3, 2003 BSD
All times are GMT -4. The time now is 11:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy