Search Results

Search: Posts Made By: maximus73
876
Posted By maximus73
Can you perfect my sed ?
I want to print only the lines that meet the criteria : "worde:" and "wordo;"
I got this far:
sed -n '/\([a-zA-Z]*\)\1e:\1o;/p;'

But it doesn't quite work.
Can someone please perfect it...
1,372
Posted By maximus73
Thank you Zaxxon, can go from this :-) Can...
Thank you Zaxxon, can go from this :-)

Can you explain how I would have done my initial desire though, i.e. setting a variable to a regex?
Even if I remove the $ sign
awk 'var ~ /:.*$/ {print...
1,372
Posted By maximus73
Regex and variable assignment
Hi there,
I really didn't want to have to waste people's time and ask this, but after 2 hours and running out of my own time I've decided to ask..

Basically I have a file in the format:

word:...
942
Posted By maximus73
Substitution mid pattern?
Hi there,

I have a file that goes like this:

b_cdbc_db_cd_bcd_aaa-bcd_cd

That type of format, for many lines.

What I want to do is enter a new line character for after the _
I write an...
3,542
Posted By maximus73
Can someone please explain sed -n '/^$/!{s/<[^>]*>//g;p;}' filename
I came across this sed expression, and it does exactly what I want.
However I haven't got the faintest clue how it does it and thus do not feel capable of using it.

Can someone please explain how...
706
Posted By maximus73
Confused with sed...
Yes I know this is a bad use of cat, but just ignore it please :P
My problem is with sed.

File: "newFile" contains:
day

Command I run:
cat newFile | sed 's/day/night'

This returns:
...
3,776
Posted By maximus73
Thank you,
Thank you,
928
Posted By maximus73
Multiple line duplicates
I'm trying to find the text that occurs for both numbers not just one, I'm sure there's an easy way to do this but I can't see it. Can someone point me in the right direction? Not just give me an...
3,776
Posted By maximus73
sed error unterminated `s' command
I have list of data I have cut down to format:

[28/Feb/2007
[27/Feb/2007
... etc etc

I am using sed command to remove the [

sed 's/[//'
Returns error:

sed: -e expression #1, char 5:...
Showing results 1 to 9 of 9

 

Featured Tech Videos

All times are GMT -4. The time now is 02:48 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy