Posts

Bash script to overwrite/append destination file with options menu [duplicate]

Image
Clash Royale CLAN TAG #URR8PPP up vote -2 down vote favorite This question already has an answer here: How to debug bash script? 7 answers I'm trying to write a bash script to prompt a user for a filename, and if the file exists, allow them to overwrite or append the file. For some reason, I keep getting returned with a syntax error despite having an issue. Unfortunately, I am not as familiar with Bash as I am with Python, and find myself confusing the syntax of the two. Nevertheless, please see below: #!/bin/bash echo "Please enter the name of your destination file: " read destFile if [ -f "$destFile" ]; then echo "This file exists." fi echo "Please enter the name of your source file: " read sourceFile echo "Do you want to 1) Overwrite, 2) Append, 3) Exit?" echo "Please select your option: " options=("Overwrite" "Append" "Exit") while [ -e "$sourceFile" ]; do ...

Cannot install mod-mono on Ubuntu 16.04 after Mono-Apache-Server 4.5 upgrade

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite Recently Mono was updated to 4.5-0xamarin3+ubuntu1604b1 from 4.4 when that happened my asp.net pages do not display properly i.e..... they just show code when you open the page in the web browser. After looking at the Apache web server logs I noticed mod-mono was not installed anymore. From there I attempted to reinstall it by using this command sudo apt-get install libapache2-mod-mono This is the result that I get The following packages have unmet dependencies: libapache2-mod-mono : Depends: mono-apache-server (< 4.4) but 4.5-0xamarin3+ubuntu1604b1 is to be installed or mono-apache-server4 (< 4.4) but 4.5-0xamarin3+ubuntu1604b1 is to be installed or mono-apache-server2 (< 4.4) but it is not installable E: Unable to correct problems, you have held broken packages. My next step is to downgrade but before I do I wanted to ask if others have seen this issue. I know this is related to the mod because if...