Sed Returns "Sed: Command Garbled"

sed returns sed: command garbled

This should work :

sed 's/-.*;/;/g' file > newFile

sed command garbled for solaris


sed -n '#Solaris version
/description/!{
H;d
}
/description/ {
x; /XCJDAST/p
}
$ {
x; /XCJDAST/p
}' tsgroupsPrevious.xml
  • after a d, sed stop the script even with a ; after, not in linux
  • ; is a substitute for line separator, not always available in non GNU sed script especially in group of action (and after command like d)
  • also, comment must start on first character of a line

Sed command garbled error due to regex

The * goes after the character class:

[0-9]*

The delimiter should not be a slash.

I think the whole cmd should be:

sed "s~-log -asofdate [0-9]*~-log -asofdate $newAsOfDate~g" /export/home/ownclp/temp/runjava.sh.bk > /export/home/ownclp/temp/runjava.sh

sed command garbled for bash 3.0


sed -n '/\*=/ {n;p;}' ...

you need to terminate the line after the p so a ; or a new line. Your code will certainly work on recent GNU sed but not on posix version

sed: command garbled in SunOS

Use:

sed '/<AddName>/{ s/<AddName>/<ModifyName>/;}' ${modified_name_file} > ${RESOURCES}/tempfile2.xml

Sed command garbled with very easy mutiline regex in bash

If you are using a "recent" bash, I think you can use cut and assign extracted values to an array:

numbers="$(cut -d',' -f2 filename.txt)"
array_numbers=( $numbers )


Related Topics



Leave a reply



Submit