Linked Questions

18 votes
1 answer
52k views

The following function in bash comes up with the error mentioned in the title. The error usually appears when the final EOF is not at the beginning of the line. EOF is at the beginning so I can't ...
slooow's user avatar
  • 369
15 votes
3 answers
7k views

I get the following error that is flagging on the last line of my code (which is empty): syntax error: unexpected end of file I can't figure out why it's saying this. I'm simply trying to use a here-...
nullByteMe's user avatar
  • 6,431
4 votes
3 answers
37k views

I got bash script, but when I run it I got some error: line 54: warning: here-document at line 42 delimited by end-of-file (wanted `EOF') #!/bin/bash echo "PODAJ IMIE" read imie echo "PODAJ ...
Budrys's user avatar
  • 96
6 votes
2 answers
19k views

I have the following file and I have chmod a+x on the file. When I try to run it, I get a line 75: syntax error: unexpected end of file. What is the error with my script? What do I need to do to fix ...
chuacw's user avatar
  • 1,883
3 votes
1 answer
26k views

Trying to run a bash script and while some things work correctly, I get this message: line 34: unexpected EOF while looking for matching `)' Here's the code, I've marked the line in question (in the ...
CSRadical's user avatar
  • 113
3 votes
2 answers
9k views

I was a running a bash script fine on one of the linux host(bash version version 3.2.25(1)), since I have moved the script to another host (bash verison version 4.2.25(1)) it is throwing warning as ...
Ruchir Bharadwaj's user avatar
4 votes
2 answers
5k views

I'm trying to write a bash script but I'm still getting this error: here document `cmd' unclosed I don't know what is wrong; please can you help? #!/bin/bash USER='login' PASS='password' echo $USER ...
przeqpiciel's user avatar
0 votes
3 answers
8k views

Here is my code, I have two files where one contains file locations and other contains input name. I want to create a for-loop that works to incorporate both those files. I tried that here #!/bin/...
0 votes
1 answer
4k views

I have the following function; function getdetails { if ! "${PSQL_PATH}" -d "$DB" -U "$DB_USER" -h localhost -p "$DB_PORT" -t -c | while read -a Record ; do taskid="${Record[0]}" ...
Niels's user avatar
  • 45
1 vote
2 answers
3k views

I'm trying to make a script that enables proxy settings if the /etc/environment file is currently empty and disables the settings if the file has text. I've written some code but not sure why the /etc/...
0 votes
1 answer
4k views

I am getting the below error for my here document: line 8: warning: here-document at line 4 delimited by end-of-file (wanted `START') ./appendJVM.sh: line 9: syntax error: unexpected end of file ...
user9062792's user avatar
0 votes
1 answer
3k views

I have a bash script I've been using for ages. It has a few lines it just start/stop some jobs in database. It is very simple and it never fails. Last year, it facts in December so a few days ago :) ...
user3863616's user avatar
0 votes
1 answer
2k views

I am writing a backup script. I think my syntax is correct but it still gives me an error. Here's my script: if [ ! -f $LIST ]; then /usr/bin/tar -g $FULLLIST -zpcf $FULL $TGT cp $FULLLIST $...
BrainInAVet's user avatar
1 vote
2 answers
693 views

I'm creating a Bash script file on iOS X that asks the user if they would like to upload a file to a server. The sftp command (with a delimiter) works fine outside the if statement but when I put the ...
Jawa's user avatar
  • 99
-1 votes
1 answer
5k views

I am not sure why it is such an hassle trying to cat content to file when the content is indented. I am trying to close this heredoc block: UserData: "Fn::Base64": !Sub | #!/bin/...

15 30 50 per page
1
2 3