Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-04-2002, 04:52 PM   #1
The Jakale
LQ Newbie
Registered: Feb 2002
Location: Here
Posts: 13

Rep: Reputation: 1
Question shell script


i am using a Red Hat 7.2 linux, on a partition and windows 98 on a fat32 patition. and i have another fat32 partitions. now, to mount and use the other partitions i use this...

mount -t vfat /dev/hda1 /mnt/win_c

this is for the C partition and for the D...

mount -t vfat /dev/hda2 /mnt/win_d

and so on....

but when i rebooted the computer, i had to mount it again. so i thought i would put the commands to mount the other partitions in a shell script. so i wrote them in a text file and to make it executablei tryed ...

chmod +x

and ...

chmod +X

but this didnt work. so i saved the file as a *.sh file to make it a shell script. when i ran the script it mounted only the hda1 or the C partition only.

i want to know how to do this. also, i want to run this script sutomatically evry time i log in linux. so if you can help me with that i will be very thankfull...
please answer me soon...
thanx,and bye...
Old 02-04-2002, 04:57 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
you want to add them in your fstab file to mount upon bootup... not a script..
Old 02-04-2002, 11:55 PM   #3
The Jakale
LQ Newbie
Registered: Feb 2002
Location: Here
Posts: 13

Original Poster
Rep: Reputation: 1

thax man, i read the man page on that file and edited it and it works fine now. thanx again.

but i still want to know how to make a shell script. can you help me with that...




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
Shell script inside shell script treotan Linux - General 4 02-19-2009 07:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 06:32 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 04:00 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 PM.

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