figuring out wildcards


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting figuring out wildcards
# 1  
Old 02-17-2011
figuring out wildcards

I'm trying to delete everything between ( and ) in a line, ie: ( start xxxx, end xxx ). there is uppercase, lowercase and numbers in the parans. and are of varied length.
I tried this:
Code:
sed 's/([a-z A-Z 0-9])//' infile > outfile

I'm not understanding the wildcard use in brackets
# 2  
Old 02-17-2011
Can you provide some example input?

From the first ( to the first closing ) would be:
Code:
sed 's/([^)]*)//'

But it's not clear that's what you want from your description.
This User Gave Thanks to Scott For This Post:
# 3  
Old 02-17-2011
Ugh !
That is so simple. TY
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

Need help figuring out how to use my Debian Partitions

Greetings, I've installed my Debian Server over 4 months ago, I didn't quite understand what the paritions were for, but the server provider made my partitions. Anyway I was putting most of my files in /gserver and it ran otu of space quickly when in the store page it says 2tb I barely used 18gb... (2 Replies)
Discussion started by: debianguy4
2 Replies

2. Shell Programming and Scripting

Need help figuring out how to create sharable functions in Perl

I am somewhat new to Perl. I have Googled Perl one liners and worked with the MIME::Lite library to send emails with attachments. But I have not done any real Perl scripting. I need to write a script to install code for our application using an Oracle database with DBI, and to track in the... (4 Replies)
Discussion started by: gandolf989
4 Replies

3. Shell Programming and Scripting

figuring out an awk one liner

I have googled around a bit and could not find an answer to how this works: echo $STRING | awk '$0=$NF' FS= I know what each part is doing. The record is being set to equal the last field and the field separator is being set to null so that each character is considered a field. Why can FS= be... (4 Replies)
Discussion started by: benalt
4 Replies

4. Shell Programming and Scripting

Help with figuring division and addition based on column data and line numbers

I have a data file in the format of 1234 xxx 1234 xxx 1234 xxx 1234 xxxI want to be able to calculate the following - COLUMN1+((LINENUMBER-1)/365) The output needs to preserve the 2nd column - 1234 xxx 1234.00274 xxx 1234.00548 xxx What is the best way to do this? I am somewhat... (9 Replies)
Discussion started by: ncwxpanther
9 Replies

5. Hardware

Figuring out if Ubuntu will work (completely) with an Acer One (w/ AMD fusion chips)

Hi, I am trying to buy a netbook with Ubuntu pre-installed. I have looked for hours and have not found anything. Calls to Dell, HP, Toshiba have confirmed them NOT selling Ubuntu preloaded laptops. This leads me to look for a netbook that can handle Ubuntu. Getting to the point... I think I... (4 Replies)
Discussion started by: mearex
4 Replies

6. UNIX for Advanced & Expert Users

problems figuring out dns

Im on an OS X 10.4 Mac server running bind 9.3, I just replaced the entire network with cisco hardware, all machines including servers now have private ip addresses that t he firewall resolves. I need to have a dns that works for both internal and external connections. any help would be great! (1 Reply)
Discussion started by: nbredthauer
1 Replies

7. UNIX for Dummies Questions & Answers

wildcards NOT

Hi All Please excuse another straightforward question. When creating a tar archive from a directory I am attempting to use wildcards to eliminate certain filetypes (otherwise the archive gets too large). So I am looking for something along these lines. tar -cf archive.tar * <minus all *.rst... (5 Replies)
Discussion started by: C3000
5 Replies

8. UNIX for Dummies Questions & Answers

Figuring out Crons

Hello, I've built a news site using SimplePie to pull in a set of feeds and display them on a page. The caching is working but the problem is that the first initial load is slow. After that, you can hit refresh and it loads very quickly. I'd like to eliminate that first slow load by creating a... (2 Replies)
Discussion started by: eightgames
2 Replies

9. UNIX for Dummies Questions & Answers

ls with wildcards

ok, I'm trying to write a script file that lists files with specific elements in the name into a txt file, it looks like this ls s*.dat > file_names.txt can't figure out whats wrong with that line, any ideas? thanks in advance (10 Replies)
Discussion started by: benu302000
10 Replies

10. UNIX for Dummies Questions & Answers

wildcards

when writing a shell script (bourne) and using a unix command like 'ls' is there anything special you need to do to use a wildcard (like *)? (3 Replies)
Discussion started by: benu302000
3 Replies
Login or Register to Ask a Question