Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

Shell Script throws error "unexpected end of file"

$
0
0

I have been working on this script for quite some time.But I have been getting errors.The script is supposed to use tmpfs to quickly transfer files from point A to point B.The script is shown below.

#!/bin/bashcat .ramv &> /dev/nullif [[ $? = "1" ]]; then    dialog --yesno "I have detected that you have not used this program before.Would you like to setup the ramdisk and install the needed packages?" 24 80elseif [[ $? = "0" ]]; thentail --lines=+27 ~/ramv.sh | bash fifiif [[ $? = "1" ]]; then    dialog --msgbox "This command will not work if you dont install the packages and the ramdisk." 24 80elseif     dialog --yesno "The ramdisk size defaults to 2GB.Do you have more than 4GB of RAM in total?" 24 80    if [[ $? = "1" ]]; then    dialog --msgbox "This command will not work if you do not have more than 4GB of RAM" 24 80    else    dialog --msgbox "I need root accsess for this to work.Could you please enter your root password?" 24 80    sudo dialog --msgbox "Thanks! We can now commence with creating the ramdisk" 24 80    sudo mkdir /mnt/tmp    sudo mount -t tmpfs -o size=2g tmpfs /mnt/tmp    sudo echo "tmpfs  /mnt/tmp  tmpfs  rw,size=2G  0   0" >> /etc/fstabdialog --msgbox "The setup has commpleted. A help file has been writen to your home folder." 24 80touch .ramvfimv $1 /mnt/tmpmv /mnt/tmp/$1 $2

The error is shown below

eli@eli-desktop:~$ ./ramv.sh./ramv.sh: line 29: syntax error: unexpected end of fileeli@eli-desktop:~$ 

Can someone show me why this error is happening and how to fix it?


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>