I think following command will make more sense.(Which I assume may fulfil your requirement of removing spaces
from a variable and take it's output to a file, with showing errors to standard output)
Following explaination may help you in same. echovalue of variabe named abcd with echo "$abcd" then remove the spaces in it with NULL with sed 's/ //g'
and taking output to redirect standard error to standard output >> ${LOGFILE} 2>&1
Thanks,
R. Singh
Last edited by RavinderSingh13; 02-12-2015 at 06:46 AM..
Reason: Added a comment
This User Gave Thanks to RavinderSingh13 For This Post:
how does below tr command replace nonletters with newlines?
I think I understand tr -cs '\n' part.. but what is
A-Za-z\' <--- what is this??
tr -cs A-Za-z\' '\n' |
-c --complement
-s, --squeeze-repeats
replace each input sequence of a repeated character that is... (0 Replies)
how does below tr command replace nonletters with newlines?
I think I understand tr -cs '\n' part.. but what is
A-Za-z\' <--- what is this??
tr -cs A-Za-z\' '\n' |
-c --complement
-s, --squeeze-repeats
replace each input sequence of a repeated character that is... (1 Reply)
Hi am having a c pgm. It has the include files (unistd.h,sys/types.h,win.h,scr.h,curses.h,stdarg.h and color.h). I don't know the purpose of these include files. will u plz explain me. (1 Reply)
What does this part in the following code ?
if ; then
$t shows some time values for getting the response, but why .$t and what does the . after the !=
t=$(time -p wget --quiet --post-data='username=xxx&password=xxxx&id=xxxxxx' --no-check-certificate --output-document=/tmp/sms-status_out... (3 Replies)
in /etc/init.d/networking of an ubuntu computer, I found this code:
if ifdown -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
Shouldn't it be replace by
ifdown -a --exclude=lo
... (0 Replies)
Its great someone provided this script that strips out a filename and extension but can someone explain how each line works?
file1='Jane Mid Doe.txt'
newfile='Jane.txt'
1) ext=${file1##*.}
2) filename=${file%%.???}
3) set -- $filename
4) newfile="1.$extension" (1 Reply)
Can you please explain the following code plz?
my_cd=' '
while getopts :e: OPTION;
do
case "$OPTION" in
e) my_cd ="$OPTARG";;
esac
done
if ; then
echo " >>> ERROR - I am wrong"
echo " >>> ERROR - Hello"
exit 99
fi
What I don't understand is what is OPTION or... (3 Replies)
Hello,
I have recently come across this awk program. Can some one shed some light on what is taking place.
awk '{!a++}END{for(i in a) if ( a >10 ) print a,i }' $FILE
Best Regards,
jaysunn (1 Reply)
Hi all
I am new to egrep can someone please explain me what does the below Statement do
egrep -v "^missing sales|^\
Thanks in advance
Sri
Please use next time code tags for your code and data (4 Replies)
dear sir,
I am new to unix zone. need some explanation on the function used.
cat /apps/prd/venue/code/bin/std.funcs
#!/usr/bin/ksh
#-------------------------------------------------------------------
# printmsg: prints the message given in arg 1 with timestamp to
# stdout... (3 Replies)
Discussion started by: gowthamsoft
3 Replies
LEARN ABOUT SUSE
unify
UNIFY(1) User Commands UNIFY(1)NAME
unify - manual page for unify 0.5.93
SYNOPSIS
unify [OPTION]... [FILE]
DESCRIPTION
unify - Transforms context diffs into unidiffs, or vice-versa.
-c, --context-diffs
force output to context diffs
-e, --echo-comments
echo comments to standard error
-o, --old-diffs
output old-style diffs, no matter what
-p, --patch-format
generate patch format
-P same as -p
-s, --strip-comments
strip comment lines
-u, --unidiffs
force output to unidiffs
-U same as -p and -u
-=, --use-equals
replace spaces by equal signs in unidiffs
--help display this help and exit
--version
output version information and exit
If FILE is not specified, read standard input.
AUTHOR
Written by Wayne Davison <davison@borland.com>.
REPORTING BUGS
Report bugs to <wdiff-bugs@gnu.org>.
COPYRIGHT
Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for unify is maintained as a Texinfo manual. If the info and unify programs are properly installed at your site,
the command
info unify
should give you access to the complete manual.
unify 0.5.93 June 2008 UNIFY(1)