Tags:

echo "#!/bin/bash\ngedit \"\$@\"" > output.file ไดอย่างไร ครับ

ผมทำแล้วมันมีปัญหาตรง #! พอทำเป็น \#\! มนก็มีเครื่องหมาย \ ติดไปใน output อีกอ่ะ ครั่บ

Get latest news from Blognone
By: อุ๊บะอันตะอู้
Windows PhoneAndroidSymbianUbuntu
on 19 August 2012 - 18:24 #460143
อุ๊บะอันตะอู้'s picture

ได้แล้ว ครับ

cat > "/usr/bin/gedit" << EOF

#!/bin/bash

geany "\$@"

EOF

ขอบคุณ http://www.unix.com/302116692-post3.html

By: neizod
ContributorTraineeIn Love
on 21 August 2012 - 18:19 #461224
neizod's picture
echo -e '#!/bin/bash\ngedit "$@"'

ไม่งั้นก็

echo -e '#!/bin/bash\n'"gedit --option 'arg1' \"arg2\""
By: อุ๊บะอันตะอู้
Windows PhoneAndroidSymbianUbuntu
on 11 September 2012 - 20:09 #471762 Reply to:461224
อุ๊บะอันตะอู้'s picture

ขอบคุณ ครับ

ความรู้ใหม่