aze Posted December 19, 2002 Report Share Posted December 19, 2002 Hi! How to create a batch file? I mean need some especial extension? maybe some heading? Quote Link to comment Share on other sites More sharing options...
paul Posted December 19, 2002 Report Share Posted December 19, 2002 you mean a shell script :-) and depends on what you want. ou can running any script (just about) in any languauge (just about) from the command line it can have any name, or any extension (it doesn't work like windows does) example: a perl script (thisismyscript.name) #!/usr/bin/perl insert perl stuff here a php script (thisismyscript.name) #!/usr/bin/php -q <? phpself(); ?> then to run it you will need to make it executable chmod 755 thisismyscript.name then you should be able to execute it by doing ./thisismyscript.name if that doesn't work try doing perl ./thisismyscript.name or php ./thisismyscript.name Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted December 20, 2002 Report Share Posted December 20, 2002 Or of course a shell script (any file name, any extension): #!/bin/bash ... some bash scripting here ... Yves. Quote Link to comment Share on other sites More sharing options...
Guest flare Posted December 20, 2002 Report Share Posted December 20, 2002 Here is a link to a Tutorial on bash scripts, hope it helps http://www.freeos.com/guides/lsst/ Quote Link to comment Share on other sites More sharing options...
aze Posted December 20, 2002 Author Report Share Posted December 20, 2002 thank you guys! Actually I need make just simple actions like change a dir (cd) and execute a program (./) In gnome when I click this file it opens like a simple text file. :( Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 20, 2002 Report Share Posted December 20, 2002 thank you guys!Actually I need make just simple actions like change a dir (cd) and execute a program (./) In gnome when I click this file it opens like a simple text file. :( probably it doesnt have the execute permission bits set. right click on it and go to the properties or something and make sure that its execution bits are checked... or go to a terminal,change to the directory containing the script and issue $ chmod +x {script_name} . ciao! Quote Link to comment Share on other sites More sharing options...
aze Posted December 20, 2002 Author Report Share Posted December 20, 2002 worked! thank you guys! Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted December 20, 2002 Report Share Posted December 20, 2002 Another way to do simple actions is to make an alias command e.g. alias seek='cd ~/somedir;grep -ri 'payroll' payroll.txt when you type seek, it will do each command. To make this permanent, you need to add it to a startup script, your .bashrc or /etc/profile file. I have a whole bunch of alias commands that I use. Want to go to my winSoftware partition? alias software='cd /mnt/software;clear;ll' Quote Link to comment Share on other sites More sharing options...
aze Posted January 1, 2003 Author Report Share Posted January 1, 2003 Well I trying to make an simple link to execute a program as SU I simply created a text file: su /usr/bin/endeavour2 but when I run it the program don't start. What I'm doing wrong? Quote Link to comment Share on other sites More sharing options...
hjlane3 Posted January 1, 2003 Report Share Posted January 1, 2003 to launch a in SU for normal just type su -c "proramhere" it will prompt u for root password then launch the program with root privliges ex.. su -c "/usr/bin/endeavour2" Quote Link to comment Share on other sites More sharing options...
aze Posted January 1, 2003 Author Report Share Posted January 1, 2003 Thank you! :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.