Bash: sed for String Substitution

using sed to replace strings in text files without a text editor

sed 's/sedtest/seedtest/' sedtest.txt > seedtest.txt && mv seedtest.txt sedtest.txt
  • s = substitute
  • find = sedtest
  • replace with = seedtest
  • sed won't alter the source file, but a destination file can be specified
  • if one wants to effectively update the SOURCE file, simply append the command with 'mv'

see also:


Sed: Search/Replace to edit files inside Docker containers

root@c460eb9bda94:/usr/local/apache2# sed 's/LogLevel warn/LogLevel debug/' conf/httpd.conf > conf/httpd.conf.changed && mv conf/httpd.conf.changed conf/httpd.conf
  1. Search/Replace in  conf/httpd.conf
  2. Pipe to conf/httpd.conf.changed
  3. move conf/httpd.conf.changed to conf/httpd.conf

Selenium Webdriver's Location In A TestFramework Stack

  • A WebBrowser is a front-end to a website http server
  • A WebDriver is a front-end to a specific WebBrowser that controls interaction with a website
  • Selenium-Server is a front-end to a WebDriver that provides API calls to interact the WebDriver over HTTP
    • Theoretically, Selenium Server provides a library of actions/listeners/utils and the WebDriver provides the custom browser implementation
    • Selenium Server does nothing without a WebDriver
  • Language bindings provide a language-specific API and interface to Selenium Server API
    • The language bindings expose/translate API calls to Selenium Server
    • Available Selenium Server functions are dependent on the Language Binding
    • Language bindings can differ in their class hierarchies, API structure, and available functions.
  • SeleniumCore = Webdriver: chromedriver.exe, iedriver.exe, geckodriver.exe
  • SeleniumServer = selenium-se

Bash: Menu Seed Script


Simple seed script for creating a menu system on linux( from stackoverflow )

# Menu Runner

PS3='Please enter choice: '
opts=("ls" "pwd" "opt3" "Quit")
select opt in "${opts[@]}"
    case $opt in
            echo "u chose ls"
            echo "u chose pwd"
            echo "u typed '$REPLY' which calls '$opt'"
            *) echo "invalid option $REPLY";;


Subscribe to