LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2013, 09:37 AM   #16
omicky83
LQ Newbie
 
Registered: Oct 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled

Please find the output as requested.

$ bash mike.sh
mike.sh: line 7: syntax error in conditional expression
'ike.sh: line 7: syntax error near `]]
'ike.sh: line 7: ` if [[ $day_now -ge $day_last ]]
You have new mail in /var/spool/mail/utibaadm
$ ls -l /bin/bash
-rwxr-xr-x 1 root root 801512 Jan 22 2009 /bin/bash
$ file /bin/bash
/bin/bash: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
$ alias bash
-bash: alias: bash: not found
$

Thanks

Michael.
 
Old 10-02-2013, 09:49 AM   #17
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Ok. Nothing strange with bash. I still believe the problem is in the DOS format, as stated in my previous post. Please try dos2unix and run again. This will solve all the problem encountered so far.
 
Old 10-02-2013, 09:54 AM   #18
omicky83
LQ Newbie
 
Registered: Oct 2013
Posts: 10

Original Poster
Rep: Reputation: Disabled
Perfect.

It works.

Many thanks

Michael.
 
Old 10-02-2013, 10:04 AM   #19
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Phew... at last! You're welcome!
 
Old 10-02-2013, 07:43 PM   #20
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
@OP: the lesson here is to get used to editing directly on Linux, instead of editing on MS then uploading

Also, this cmd as the 2nd line of a script will help to debug it
Code:
set -xv
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command/Script required to send an email alert in case command will not respond rajaniyer123 Linux - General 1 05-19-2012 02:12 PM
Executing shell command from JSP file with command line arg from URL orcusomega Programming 2 01-13-2012 04:38 PM
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 12:21 PM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 02:31 PM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 07:30 PM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration