LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2006, 01:01 AM   #1
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Rep: Reputation: 15
Bath-Files under linux


How do you create bath files under linux (I mean like .bat files under dos systems)

I need this information for two purposes:

1) To make shortcuts to video files (so that I can set some parameters for the player and freely choose player) This I can probably do with symbolic links or something I supose

2) To transconde multiple videos using ffmpeg comman line input.

Also I would like to know how to setup bath file in linux so, that computer doesn't start new task before the first is finished.

Still I would like to know the console command to shut down the computer (so that I can setup computer to shut down when the bath file is finished)
 
Old 04-01-2006, 01:37 AM   #2
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
In Linux, the equivalent of a batch file is a shell script. Assuming you're using BASH, I'd suggest you look at this good begginner's guide:
http://www.google.com/url?sa=t&ct=re...-Zqv4XszKAZCPA
Quote:
Still I would like to know the console command to shut down the computer (so that I can setup computer to shut down when the bath file is finished)
Use (as root):
Code:
#shutdown -h now
 
Old 04-01-2006, 01:44 AM   #3
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
Quote:
Originally Posted by mashed
1) To make shortcuts to video files (so that I can set some parameters for the player and freely choose player) This I can probably do with symbolic links or something I supose
What you are looking for here is likely a launcher. Read up on launchers in your window manager's (ie gnome/kde/etc) documentation. This could also be accomplished with a shell script
Quote:
Originally Posted by mashed
2) To transconde multiple videos using ffmpeg comman line input.
Again, investigate shell scripts or have a look at my next response to your next question.
Quote:
Originally Posted by mashed
Also I would like to know how to setup bath file in linux so, that computer doesn't start new task before the first is finished.
shell scripts are processed sequentially. or from the command line, you can use the following operators which will wait for each command to be processed sucessfully before moving on to the next
echo 1 && sleep 3 && echo sleeped_3 && echo 4 && ls -la

Quote:
Originally Posted by mashed
Still I would like to know the console command to shut down the computer (so that I can setup computer to shut down when the bath file is finished)
the following command (as root) will shutdown the computer (in most Linux distributions):
shutdown -h now
or -r to reboot... man shutdown for more info.

What your asking for will require you to do some investigation and some trial and error... there are no simple answers.
If you have some real examples that you would like help writing a shell script around, there are many of us here who can help.

good luck
cheers
 
Old 04-01-2006, 08:55 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Sorry, the phrase "bath file" bugs me a lot -- In Win, it's a batch file, & in Linux a bash file.

I suppose a bath file, if it existed, would be one that would run on either system. This can be done, I have, but it's pointless, except as a learning exercise.
 
Old 04-01-2006, 08:59 AM   #5
demented_are_go
Member
 
Registered: Mar 2006
Distribution: Fedora Solaris Slackware
Posts: 50

Rep: Reputation: 15
I just had to... can you use bath files to get rid of windows viruses?
 
Old 04-01-2006, 09:32 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Thanks for the chuckle.
 
Old 04-01-2006, 10:00 AM   #7
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
Quote:
in Linux a bash file
Since we're being anal, who says bash is the only shell in linux? I run zsh, are you discriminating against my shell of choice? I think that "shell script" is probably the correct term.
 
Old 04-02-2006, 01:25 PM   #8
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks for the help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 04:07 PM
Changing bath PATH permanently ... angel115 Linux - General 7 09-04-2005 11:05 PM
.sit files and .bin files in Linux pierre24 Linux - Newbie 2 02-02-2005 08:55 AM
c header files in linux in place of header files in windows? harun_acs Programming 1 03-17-2004 03:24 AM
Installing Samba=Giving two rabid cats 1 bath dauphinfay Linux - Networking 6 03-01-2004 10:13 PM


All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration