Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

What program do i need to write Bash scripts?


  • Please log in to reply
2 replies to this topic

#1 haun

haun

  • Members
  • 156 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Denver, CO
  • Local time:09:28 AM

Posted 17 February 2009 - 08:15 PM

Ok i am a noob to Linux/Unix.

I am running Linux mint 6 out of Virtual Box. It allows me to create shared folders between windows and linux.

The only problem is that i have to mount the drive every time.

So i need to make a script that i can run so i dont have to type it in every time i run linux.

BUT the only problem is that i dont know WHERE to write it.

Any help?
Annnnd you're, asking, me...

BC AdBot (Login to Remove)

 


#2 raw

raw

    Bleeping Hacker


  • Members
  • 2,577 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:10:28 AM

Posted 19 February 2009 - 10:27 PM

Open a terminal, become root.
Type fdisk -l <-lowercase "L"
Determine which partition you want to mount. (ex: /dev/hdb6)
Type mkdir /mnt/win_e (win_e is my FAT32 partition...pick a name that suits you)

Edit /etc/fstab to automount.
In the terminal, still as root type: kwrite /etc/fstab
add this entry: /dev/hdb6 /mnt/win_e vfat user,exec,rw,auto,iocharset=iso8859-1,codepage=850,umask=0 0 0
Save and reboot. You should now find your files in /mnt/win_e (or whatever you named it)

rawsig.png

 rawcreations.net          @raw_creations


Current systems: WHAT OS, BackTrack-raw, PCLinuxOS, Peppermint OS 6, Kali Linux

and a custom Linux From Scratch server hosting a bunch of top secret stuff.


#3 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,260 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:07:28 AM

Posted 20 February 2009 - 03:55 PM

As raw has already made an excellent suggestion for mounting the drive, I'll just put these $0.02 in:

All you need to write a bash script is a text editor. Simply enter the commands into a blank text file (one per line). Make sure the first line is this:

#!/bin/bash

Then save the file as something.sh where something is a descriptive name of some sort.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users