Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bash sh - command not found [duplicate]

Tags:

linux

bash

#!/bin/bash
cd ~/workspace/trunk;
svn up;

When I run ./build.sh form command line, it says:

: command not found

And nothing happens. How can I solve this ?

like image 947
membersound Avatar asked Jun 01 '12 14:06

membersound


People also ask

How do I fix bash command not found?

Sometimes when you try to use a command and Bash displays the "Command not found" error, it might be because the program is not installed on your system. Correct this by installing a software package containing the command.

What is ${ 2 in bash?

$1 , $2 , et al are the command-line arguments to your program (or function). Putting the two together it means to return $2 if there were two arguments passed, otherwise return $1 .

What does sh command do?

The sh command invokes the default shell and uses its syntax and flags. The shell linked to the /usr/bin/sh path is the default shell. The standard configuration of the operating system links the /usr/bin/sh path to the Korn shell.


2 Answers

I solved adding execute permissions:

sudo chmod +x file.sh

like image 134
laz4 Avatar answered Oct 16 '22 00:10

laz4


I Have resolved my error from this command.

sudo chmod +x build.sh
like image 29
Vijendra patidar Avatar answered Oct 16 '22 02:10

Vijendra patidar