Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ . $'/directory/.profile\r'
: No such file or directorypfo/.profile
+ . $'/directory/rc/fo_svr.rc\r'
: No such file or directoryds/rc/fo_svr.rc
+ $'\r'
: command not found
+ FEDS=$'/directory/feds\r'
+ FEDSBIN=$'/directory/bin\r'
+ CRON_DIR=$'/directory/cronDir\r'
+ . $'/directory/cronDir\r/scrubReport/MBS_ScrubReport/env.sh\r'
: No such file or directoryt/env.shDir
+ export HOME FEDS FEDSBIN $'LD_LIBRARY_PATH\r'
': not a valid identifiert: `LD_LIBRARY_PATH
+ $'\r'
: command not found
+ $'\r'
: command not found
+ STARTAPP_DIR=/directory/bin
+ export $'STARTAPP_DIR\r'
': not a valid identifiert: `STARTAPP_DIR
+ OUT_DIR=$'/home/cronDir\r/scrubReport/output\r'
+ LOG_DIR=$'/home/cronDir\r/scrubReport/logs\r'
+ $'\r'
: command not found
+ $'\r'
: command not found
+ /bin/rm $'/home/cronDir\r/scrubReport/output\r/errors_mbs.csv\r'
: No such file or directory
+ /bin/rm $'/home/cronDir\r/scrubReport/logs\r/logs_mbs.csv\r'
: No such file or directory
+ $'\r'
: command not found
+ $'\r'
: command not found
+ /startApp -c 1 -m 4048 -w 5 -z 600 -i sbtorsvr57 -s 'cd cronDir/scrubReport/MBS_ScrubReport; scrub.sh'
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'--------------------------\r'
: command not found --------------------------
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
The \r is the escape sequence for "carriage return". It looks like this script has been written in a Windows system and transferred to Linux. Carriage returns are a poison for bash. Try to run the following command:
0000000 # ! / b i n / s h \r \n \r \n \r \n #
0000020 * * * * * * * * * * * * * * * *
0000040 * * * * * * M a i n s h e l l
0000060 s c r i p t * * * * * * * * *
0000100 * * * * * * * * * * * * * * * *
0000120 * * * * * * * * # \r \n # T h i
0000140 s s c r i p t r u n s s u
0000160 b M a i n . c p p w h i c h
0000200 r u n s t h e R m d s U t i
0000220 l . c p p a n d g e n e r a
0000240 t e s # \r \n # o u t p u t
0000260 f i l e s l o g _ m b s . c s
0000300 v
0000320
*
0000360 # \r \n # a n d e r r o r s
0000400 _ m b s . c s v . e r r o r s
0000420 _ m b s . c s v c o n t a i n
0000440 s d e t a i l s o f t h
0000460 e C M T S b o n d s # \r \n
0000500 # w i t h e r r o r s i n
0000520 t h e i r s a v e d l e v
0000540 e l s .
0000560
0000600 # \r \n # * * *
0000620 * * * * * * * * * * * * * * * *
*
0000720 * * * * * # \r \n \r \n . $ H O M
0000740 E / . p r o f i l e \r \n . / b
0000760 n s / f e d s / r c / f o _ s v
0001000 r . r c \r \n \r \n F E D S = / b
0001020 n s / f e d s \r \n F E D S B I N
0001040 = / b n s / f e d s / b i n \r \n
0001060 C R O N _ D I R = $ H O M E / c
0001100 r o n D i r \r \n . $ C R O N _
0001120 D I R / s c r u b R e p o r t /
0001140 M B S _ S c r u b R e p o r t /
0001160 e n v . s h \r \n e x p o r t H
0001200 O M E F E D S F E D S B I N
0001220 L D _ L I B R A R Y _ P A T H
0001240 \r \n \r \n # d e f i n e t h e
0001260 d i r e c t o r y n e e d e
0001300 d w h e r e c r o n s t u
0001320 f f i s f o u n d . E r
0001340 r o r m e s s a g e s a n d
0001360 \r \n # l o g s a r e p u t
0001400 i n t h e " l o g s " s
0001420 u b d i r e c t o r y \r \n \r \n S
0001440 T A R T A P P _ D I R = / h o m
0001460 e / a d r a g a l i / p r o j e
0001500 c t s / l b a l a n c e r / b i
0001520 n e x p o r t S T A R T A P
0001540 P _ D I R \r \n # S T A R T A P P
0001560 _ D I R = $ H O M E / a d r a g
0001600 a l i / p r o j e c t s / l b a
0001620 l a n c e r / b i n e x p o r
0001640 t S T R A T A P P _ D I R \r \n
0001660 O U T _ D I R = $ C R O N _ D I
0001700 R / s c r u b R e p o r t / o u
0001720 t p u t \r \n L O G _ D I R = $ C
0001740 R O N _ D I R / s c r u b R e p
0001760 o r t / l o g s \r \n \r \n # - - -
0002000 - - - - - - - R u n n i n g s
0002020 u b M a i n . c p p a n d r
0002040 e d i r e c t i n g t h e o
0002060 u t p u t - - - - - - - - - - -
0002100 - - \r \n \r \n / b i n / r m $ O
0002120 U T _ D I R / e r r o r s _ m b
0002140 s . c s v \r \n / b i n / r m $
0002160 L O G _ D I R / l o g s _ m b s
0002200 . c s v \r \n \r \n \r \n $ { S T A R
0002220 T A P P _ D I R } / s t a r t A
0002240 p p - c 1 - m 4 0 4 8
0002260 - w 5 - z 6 0 0 - i "
0002300 s b t o r s v r 5 7 " - s "
0002320 c d c r o n D i r / s c r u b
0002340 R e p o r t / M B S _ S c r u b
0002360 R e p o r t ; s c r u b . s h
0002400 " > / h o m e / d p f o / c r o
0002420 n D i r / s c r u b R e p o r t
0002440 / l o g s / l o g s _ m b s . c
0002460 s v 2 > / h o m e / d p f o /
0002500 c r o n D i r / s c r u b R e p
0002520 o r t / o u t p u t / e r r o r
0002540 s _ m b s . c s v \r \n \r \n \r \n \r
0002560 \n \r \n \r \n \r \n \r \n \r \n - - - - -
0002600 - - - - - - - - - - - - - - - -
0002620 - - - - - \r \n \r \n # ( \r \n # . /
0002640 s u b M a i n 2 / b n s / d e
0002660 r i v P r o d D a t a / f i x e
0002700 d I n c o m e D a t a / T S X /
0002720 e x t r a c t s / t s x . b o n
0002740 d _ q u o t e s . c s v \r \n # /
0002760 h o m e / L B a r b u l o v i c
0003000 N a d / S c r u b R e p o r t
0003020 s / L i v e / M B S R e p o r
0003040 t . x l s \r \n # ) > > / h o m
0003060 e / n h e i d a / l o g _ M B S
0003100 . c s v 2 > > / h o m e / n h
0003120 e i d a / e r r o r s _ M B S .
0003140 c s v \r \n \r \n # / b i n / r m
0003160 / h o m e / n h e i d a / o u t
0003200 p u t / e r r o r s _ m b s . c
0003220 s v \r \n # / b i n / r m / h o
0003240 m e / n h e i d a / o u t p u t
0003260 / l o g _ m b s . c s v \r \n \r \n
0003300 # ( . / s u b M a i n / b n s
0003320 / d e r i v P r o d D a t a / f
0003340 i x e d I n c o m e D a t a / T
0003360 S X / e x t r a c t s / t s x .
0003400 m b s _ q u o t e s . c s v )
0003420 > > / h o m e / n h e i d a /
0003440 o u t p u t / l o g _ m b s . c
0003460 s v 2 > > / h o m e / n h e i
0003500 d a / o u t p u t / e r r o r s
0003520 _ m b s . c s v \r \n
0003532
That you're not running GNU sed. Which system are you running on? Your best option now is to copy your script from your previous post #9, then paste it as standard input to the command:
Code:
$ cat > new_sub.sh
pasted text here
Ctrl-D
in this way you create a new script that can be further edited and eventually serves as replacement for the original sub.sh file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.