Difference between revisions of "IT/WebAuthoring"

From CA Greens wiki
Jump to: navigation, search
(Created page with ' Wikipedia has a page about its wiki markup language.')
 
(Deleting a line from a file)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Editing pages in this wiki==
 +
Wikipedia has a [[http://en.wikipedia.org/wiki/Help:Wiki_markup page]] about its wiki markup language.  The previous sentence contains [[http://en.wikipedia.org/wiki/Help:Wiki_markup#link-external an external link]].  So does that one.
  
Wikipedia has a [[http://en.wikipedia.org/wiki/Help:Wiki_markup|page]] about its wiki markup language.
+
==Editing pages on our server==
 +
Use [[http://docs.freebsd.org/44doc/usd/12.vi/paper.html vi]], or download, edit, upload.
 +
 
 +
==Deleting a line from a file==
 +
Sometimes you don't want to bother with an editor.  The grep -v command passes every line through unless it matches some pattern.  Here I'll use it to delete the style sheet link from a page.
 +
 
 +
  pushd /w/cal/liaison/docs
 +
  grep _styles_basic.css status_nota_1992_1995.htm
 +
The system replies<br />
 +
<code>&lt;link rel="stylesheet" type="text/css" href="http://www.cagreens.org/sitetools/_styles_basic.css" /&gt;</code><br />
 +
and that's the line we don't want.  I'll stash grep's output in a temporary file, z.  Then I'll replace the old file with it.
 +
  grep -v _styles_basic.css status_nota_1992_1995.htm > z
 +
  mv z > status_nota_1992_1995.htm

Latest revision as of 23:16, 8 April 2010

Editing pages in this wiki

Wikipedia has a [page] about its wiki markup language. The previous sentence contains [an external link]. So does that one.

Editing pages on our server

Use [vi], or download, edit, upload.

Deleting a line from a file

Sometimes you don't want to bother with an editor. The grep -v command passes every line through unless it matches some pattern. Here I'll use it to delete the style sheet link from a page.

 pushd /w/cal/liaison/docs
 grep _styles_basic.css status_nota_1992_1995.htm

The system replies
<link rel="stylesheet" type="text/css" href="http://www.cagreens.org/sitetools/_styles_basic.css" />
and that's the line we don't want. I'll stash grep's output in a temporary file, z. Then I'll replace the old file with it.

 grep -v _styles_basic.css status_nota_1992_1995.htm > z
 mv z > status_nota_1992_1995.htm