interactive sed

This commit is contained in:
ville rantanen
2014-04-01 15:18:36 +03:00
2 changed files with 18 additions and 2 deletions

View File

@@ -45,5 +45,5 @@ fi
[ -z "$BUNDLESTRING" ] && return_error "Could not find given bundle: $search"
echo $ANDURIL_HOME/bin/anduril build-doc doc_${search} --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml
eval $ANDURIL_HOME/bin/anduril build-doc doc_${search} --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml
echo $ANDURIL_HOME/bin/anduril build-doc result_doc --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml
eval $ANDURIL_HOME/bin/anduril build-doc result_doc --log log_doc "$BUNDLESTRING" -t $MICROHOME/datatypes.xml

View File

@@ -223,6 +223,22 @@ function igrep () {
}
function ised () {
# Interactive sed
local args
if [ ! -f "$1" ]; then echo must give atleast one file; return 1;fi;
args="-e s/string//g"
while true
do read -e -i "$args" args
echo input files: "$@"
eval sed $args "$@"
if [ "$?" -ne 0 ]
then echo Error output | grep --color=auto ".*"
fi
done
}
function foldermenu_prompt {
[ -f .foldermenu ] && {
echo -n "f:"