Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 09:47
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Need the shebang for all 1 line scripts
Moderators: Lobster, MU, raffy
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message
y@s

Joined: 04 Apr 2009
Posts: 4
Location: Japan.

PostPosted: Sun 31 May 2009, 09:32    Post_subject:  Need the shebang for all 1 line scripts  

Hi, all.
I'm Japanese. When my English is strange, tell me.

I expect that shebang(#!/bin/sh or #!/bin/bash) is added to all 1 line scripts.
When there is no shebang, bash misjudge that file as binary file if the 1st line includes some multi byte characters.
sample is below.


As one example, in case of the /usr/sbin/wag-profiles, this way is good.
Code:
*** /usr/sbin/wag-profiles.sh.org   2009-04-04 14:36:44.000000000 +0900
--- /usr/sbin/wag-profiles.sh   2009-05-31 21:07:51.000000000 +0900
***************
*** 1837,1843 ****
              SCANWINDOW_BUTTONS="$SCANWINDOW_BUTTONS \"$CELL\" \"$CELL_ESSID (${CELL_MODE}; ${L_SCANWINDOW_Encryption}$CELL_ENC_TYPE)\" off \"${L_SCANWINDOW_Channel}${CELL_CHANNEL}; ${L_SCANWINDOW_Frequency}${CELL_FREQ}; ${L_SCANWINDOW_AP_MAC}${CELL_AP_MAC};
  ${L_SCANWINDOW_Strength}${CELL_QUALITY}\""
           done
!          echo "Xdialog --left --item-help --stdout --title \"$L_TITLE_Puppy_Network_Wizard\" --radiolist \"$L_TEXT_Scanwindow\"  20 60 4  \
     ${SCANWINDOW_BUTTONS} 2> /dev/null" > /tmp/net-setup_scanwindow
        fi
        echo "X"
--- 1837,1843 ----
              SCANWINDOW_BUTTONS="$SCANWINDOW_BUTTONS \"$CELL\" \"$CELL_ESSID (${CELL_MODE}; ${L_SCANWINDOW_Encryption}$CELL_ENC_TYPE)\" off \"${L_SCANWINDOW_Channel}${CELL_CHANNEL}; ${L_SCANWINDOW_Frequency}${CELL_FREQ}; ${L_SCANWINDOW_AP_MAC}${CELL_AP_MAC};
  ${L_SCANWINDOW_Strength}${CELL_QUALITY}\""
           done
!          echo -e "#!/bin/bash\nXdialog --left --item-help --stdout --title \"$L_TITLE_Puppy_Network_Wizard\" --radiolist \"$L_TEXT_Scanwindow\"  20 60 4  \
     ${SCANWINDOW_BUTTONS} 2> /dev/null" > /tmp/net-setup_scanwindow
        fi
        echo "X"
***************
*** 2019,2025 ****
       echo "X"
     fi
     if [ "$SCANWINDOW_BUTTONS" ] ; then
!       echo "Xdialog --left --item-help --stdout --title \"$L_TITLE_Puppy_Network_Wizard\" --radiolist \"$L_TEXT_Prism_Scan\"  20 60 4  \
     ${SCANWINDOW_BUTTONS} 2> /dev/null" > /tmp/net-setup_scanwindow
     else
       #echo "Xdialog --left --title \"Puppy Network Wizard:\" --msgbox \"No networks detected\" 0 0 " > /tmp/net-setup_scanwindow
--- 2019,2025 ----
       echo "X"
     fi
     if [ "$SCANWINDOW_BUTTONS" ] ; then
!       echo -e "#!/bin/bash\nXdialog --left --item-help --stdout --title \"$L_TITLE_Puppy_Network_Wizard\" --radiolist \"$L_TEXT_Prism_Scan\"  20 60 4  \
     ${SCANWINDOW_BUTTONS} 2> /dev/null" > /tmp/net-setup_scanwindow
     else
       #echo "Xdialog --left --title \"Puppy Network Wizard:\" --msgbox \"No networks detected\" 0 0 " > /tmp/net-setup_scanwindow

Regards.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0647s ][ Queries: 11 (0.0228s) ][ GZIP on ]