Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/ullgren/pontus.ullgren.com/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/ullgren/pontus.ullgren.com/includes/common.inc).

unix

Sed

Sed is a very useful program that often is used as a filter in shell scripts.

From the sed man page:

Sed  is a stream editor.  A stream editor is used to perform basic text
transformations on an input stream (a file or input from  a  pipeline).

== Simple find-and-replace in text file ==
To replace all occurrences of the string ''findme'' and replace it with the string ''replcaceme'' in a file named test.file using ''sed'' just use the follwing command.

sed -e 's/findme/replaceme/g' test.fil > newtest.fil