Is "go" in UNIX format?


Recommended Posts

I loaded go script in my favourite text editor (in Windows, but this editor is able to distinguish DOS and Linux files - from the LF/CR probably) and found out it is in "DOS" format.

 

Am I doing something wrong? I expected this would be in UNIX format.

 

 

Link to comment

Because Tom expected people to possibly edit it, it is executed like this when invoked from /etc/rc.d/rc.local:

 

# Invoke the 'go' script

if [ -f /boot/config/go ]; then

  fromdos </boot/config/go >/var/tmp/go

  chmod +x /var/tmp/go

  /var/tmp/go

fi

 

By passing the "go" script through "fromdos" the extra dos cr/line feed sequences are removed.  The script is actually copied to /var/tmp/go, made executable, and then executed from /var/tmp.

 

Joe L.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.