http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Computer Programming \ linux batch files

Click here to log in (you must be logged in to post comments).

AuthorComment
gulyman
Goliath
avatar
Posted: 3 Oct 2008
21:46 GMT
Total Posts: 144
What's the equivalent of a batch file for Linux?
I've tried putting the commands

clear
echo test
suspend

into a file called test1. I go to a terminal and try to open it two ways.
./test1 (it says I don't have permission even when I try as root)
test1 (no command called test1 found)
gulyman
Goliath
avatar
Posted: 3 Oct 2008
22:09 GMT
Total Posts: 144
With some more research I found out that I had to set chmod to 755 on the file.
I could have also opened it with
bash test1
Zachary940
Wraith
avatar
Posted: 4 Oct 2008
17:24 GMT
Total Posts: 714
Yay for Google. Linux is great, and about 90% of the time when you get a permission error make sure that file or folder has correct permissions. They can get annoying sometimes.

---
It is much easier to suggest solutions when you know nothing about the problem.





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org