Tag Archives: text

Replacing a string with another in a text file using sed

sed -i ‘s/old-test/new-text/g’ filename This replaces the word old-test with the word new-text in the file named filename.

Posted in Uncategorized | Tagged , , , | Leave a comment

How to extract a number from a string (not a file) in Bash

export hobba=ksjdjf123ksks export nokka=`sed “s/[^0-9]//g” <<< $hobba` echo $nokka 123 Sources: http://stackoverflow.com/questions/13055889/sed-with-a-literal-string-not-input-file, http://stackoverflow.com/questions/6388046/extract-integer-from-string-using-bash

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Installing a Text-based Browser on AIX (Lynx)

If you want a very simple text-based web browser in order to test responses on an AIX server and don’t want to waste time and bandwidth using Firefox – if it exists – and an X-session, use “Lynx”, Here are … Continue reading

Posted in Unix | Tagged , , , , | 2 Comments