script issues from suse to RHEL5 AS
We recently migrated one server from SUSE OS to RHEL5. The problem is the shell scripts do not produce the desired outcome :confused: on the command line the output does not have any issues. Example:- S1=`cat $FILE1|grep -v /|grep [0-9]` from the prompt echo $S1 is 129 but code when fired in a script using bash or ksh outputs S1=$'129\r'. The same has been working fine on SUSE OS. Does this have to do with user profile/env etc?
Thnaks in advance for any valuable input :) |
Quote:
Try Code:
S1=$(/bin/cat $FILE1|/bin/grep -v /|/bin/grep [0-9]) So try the following for that Code:
/bin/echo ${S1} |
All times are GMT -5. The time now is 11:11 AM. |