converting ur from sed to bash, example segfaults