Search Results

Search: Posts Made By: georgi58
Forum: Web Development 11-13-2013
1,439
Posted By Neo
You should find out why a bad URI is returning a...
You should find out why a bad URI is returning a 200 status code.

Perhaps you have some rewrite rules already that are effecting this?
Forum: Web Development 11-13-2013
1,439
Posted By Scott
Something like: RewriteRule...
Something like:

RewriteRule (.*\.html).*\.html$ $1 [R=301,L]


http://htaccess.madewithlove.be
22,452
Posted By RudiC
Alternative, taking into account not just new...
Alternative, taking into account not just new lines but paragraphs (if a paragraph separator is defined as an empty line) and also considering punctuation only at the end of words:awk '!NF ||...
22,452
Posted By sea
i'm using this function to change the first...
i'm using this function to change the first letter of a word to caps:
Capitalize() { # STRING
# Makes first char capital
# by stevea & shorten by dd_wizard @ fedoraforum.org
low=${1,,}
...
22,452
Posted By Akshay Hegde
Try Sed for each word $ echo foo...
Try

Sed

for each word

$ echo foo test | sed 's/\([a-z]\)\([a-zA-Z0-9]*\)/\u\1\2/g'
Foo Test
Awk

$ echo foo test | awk '{$1=toupper(substr($1,0,1))substr($1,2)}1'
Foo test
22,452
Posted By Yoda
An approach using awk: awk ' { ...
An approach using awk:
awk '
{
for ( i = 1; i <= NF; i++ )
{
if ( i == 1 )
$i = sprintf ( "%s",...
2,807
Posted By Scrutinizer
So more like this? awk -F\| '/http:/{for(i=1;...
So more like this?
awk -F\| '/http:/{for(i=1; i<=6; i++) if($2>=i)print $1 > ("sitelist_PR" i ".txt")}' file
2,807
Posted By MadeInGermany
Save whatever commands to a file, and you can run...
Save whatever commands to a file, and you can run it with
bash file
3,366
Posted By chihung
Assuming that your 'link' tag is in two lines ...
Assuming that your 'link' tag is in two lines

awk '
/^<link rel="alternate" type="application\/rss\+xml"/ || /^<link rel="alternate" type="text\/x-opml"/ {
getline
next
}
{
...
1,723
Posted By bartus11
perl -lp0e 's/<h1>.*<table/<table/s' infile >...
perl -lp0e 's/<h1>.*<table/<table/s' infile > outfile
1,723
Posted By jim mcnamara
awk 'BEGIN{ok=1} /^<h1>/ {ok=0} ...
awk 'BEGIN{ok=1}
/^<h1>/ {ok=0}
/<^table summary="Free anniversary greeting cards" cellspacing="8" cellpadding="8" width="70%"> {ok=1}
ok==1 {print}
ok==0 {next} ' ...
1,723
Posted By bartus11
perl -i.bak -lp0e 's/<h1>.*<table/<table/s'...
perl -i.bak -lp0e 's/<h1>.*<table/<table/s' infile
3,559
Posted By panyam
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/'...
sed 's/\(.*\)<a href.*>\(.*\)/\1\2/' input_file
3,559
Posted By jlliagre
sed -e 's/<a href[^>]*>//g' -e 's/<\/a>//'...
sed -e 's/<a href[^>]*>//g' -e 's/<\/a>//' input_file
5,293
Posted By Corona688
Welcome to the forum. First off, I never...
Welcome to the forum.

First off, I never reccomend editing in-place, but you've had the wisdom to use backup files so that's good.

You don't need to escape the numbers, which is probably why...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy