surf-google
public text v1 · immutable#!/bin/bash
CLIPBOARD=$(xclip -o)
# put this in the backup
# soon
# I want to use the =~ but does not seem to be working for me
#if [ "$CLIPBOARD" =~ 'http://' ]
if [ $(expr "$CLIPBOARD" : '\(http://\)') ]
then
surf "$CLIPBOARD"
else
surf "http://www.google.com/search?q=$CLIPBOARD"
fi