Original post: http://topic.csdn.net/u/20071101/11/4bf1047d-dc46-4b39-9766-4f05b0eeaca7.html
Shell syntax error: unexpected end of file error message [Closed, closed by: myepoch] |
-
-
Add as a friend
-
Send private message
-
Online Chat
- Myepoch
- Myepoch
- Level:
- Available levels:Fu Nong
- Total technical experts:131
- Total technical experts ranking:76086
- Posting rate:26.51%
|
Posted on:2007-11-01 11:47:43 Landlord |
If [-N "$1"] Then Echo & quot; 111 & quot" Else Echo & quot; 222 & quot" Fi Exit 0Execute sh my. Sh par and prompt syntax error: unexpected end of file. What is the error? I wrote this file in notepad in windows and ran it in the cygwin simulated Linux software environment. I think there should be no problem with the syntax itself. Does it affect character set encoding? How can I change it. |
|
|
Problem points:10 Replies:8Show all repliesShow star repliesShow landlord reply Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Cceczjxy
- This machine is in hell
- Level:
- Available levels:Fu Nong
- Total technical experts:14376
- Total technical experts ranking:1065
6 2
|
Posted on:2007-11-01 12:51:051Floor score:1 |
It may be a carriage return/r problem. you can remove it. In Windows, the line feed uses two symbols. Press enter to change the line/R/n. in Linux, you only need one symbol/n. |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Myepoch
- Myepoch
- Level:
- Available levels:Fu Nong
- Total technical experts:131
- Total technical experts ranking:76086
|
Posted on:2007-11-01 13:03:252Floor score:0 |
Why should I press enter? I have already entered the above Code. |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Yecheng_110
- I want to take advantage of the wind
- Level:
- Available levels:Zhongnong
- Total technical experts:4568
- Total technical experts ranking:4508
|
Posted on:2007-11-01 13:07:063Floor score:5 |
Dos2unix |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Mymtom
- Mymtom
- Level:
- Available levels:Fu Nong
- Total technical experts:11510
- Total technical experts ranking:1602
2
|
Posted on:2007-11-01 13:44:274Floor score:1 |
Follow up with the xtrace option of sh. Sh-X my. Sh par |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Myepoch
- Myepoch
- Level:
- Available levels:Fu Nong
- Total technical experts:131
- Total technical experts ranking:76086
|
Posted on:2007-11-01 13:52:105Floor score:0 |
#! /Bin/bash If [-n "$1"] Then Echo & quot; 111 & quot" Else Echo & quot; 222 & quot" Fi Exit 0 ----------------- Sh-X my. Sh par The error syntax error: unexpected end of file is still prompted. It's awful. |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Rezood
- Tianxingjian, a gentleman strives for self-improvement
- Level:
- Available levels:Zhongnong
- Total technical experts:789
- Total technical experts ranking:23136
|
Posted on:2007-11-01 16:08:066Floor score:1 |
Whether the FTP file is in Bin format requires ASC |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Mymtom
- Mymtom
- Level:
- Available levels:Fu Nong
- Total technical experts:11510
- Total technical experts ranking:1602
2
|
Posted on:2007-11-01 16:41:117Floor score:1 |
After actual verification, the second floor is correct. It is used in VI. : 1, $ S/^ m // Replace ^ m: |
|
Modify Delete Report Reference Reply
|
|
-
-
Add as a friend
-
Send private message
-
Online Chat
- Mymtom
- Mymtom
- Level:
- Available levels:Fu Nong
- Total technical experts:11510
- Total technical experts ranking:1602
2
|
Posted on:2007-11-01 16:42:128Floor score:1 |
If you want to learn UNIX, use VI! |
|