Open OWL File in Protege from Command Line on Linux - protege

Is it possible to use command line on linux to open a file on Protege, each and everytime I'm having to use Open File to open a file and I've load of files

Related

Create file with nano on .sh file

I'm pretty new using command line with ubuntu and I need to create a .sh file and inside the sh file I need to create a file using nano for a server block, I'm trying to create that but I do not know how to do that?
example:
nano /etc/xyz/file
Code that goes inside the nano file
close file and save.
And then continue with the other commands inside the .sh file, is that possible?

run command within Vim (but from a different directory)

I would like to run pdflatex from within vim to update the pdf file I'm currently working editing, which is a chapter-xx.tex file. My main problem is that my chapter-xx.tex file is just an input file within my MASTER.tex file, which is in another directory.
I can try this:
:!pdflatex template/MASTER.tex
That does run pdflatex on my MASTER.tex file, which has my chapter-xx.tex file as an input file. However, pdflatex can't find my input files. I believe this is because my current working directory is that of the chapter-xx.tex file that I'm currently working on. The input file paths inside MASTER.tex file are all relative to it's own directory structure. From bash, where template/MASTER.tex resides, it has zero problems. But inside my chapter-xx.tex file, which is one directory down. ( ../) from MASTER.tex, it can't find the input other .tex files, which are input files within MASTER.tex
I believe the question I need to ask is how to change the current working directory then run the pdflatex command, while still working in my chapter-xx.tex file.
by the way, each chapter has actual numbers rather than "xx" by the way.
Also, pdflatex takes a text file (.tex) and converts it into a pdf file. A .tex file can also import other .tex files, which is my case. I have one MASTER.tex file, with numerous imports of other tex files, such as Chapters.

Opening Exec from different directory

Beginner linux user here,
I want to create an sh file which will open firefox, file explorer and sublime text, rather than execute these commands separately. I have created a bin folder in /home/user and have saved my .sh file there.
Everything runs as I want to except for running the sublime_text executable.
It cannot find the directory as I am running the sh file from the bin directory.
So, my question is, how can I open sublime text from another directory without creating another shell process to do so.
#!/bin/bash
cd /home/user/
./Documemnts/sublime_text_3/sublime_text
xdg-open ~/Documents/sublime_text_3/sublime_text
firefox -new-tab -url https://www.google.com
xdg-open Documents/Work/
I get No such file or directory
or
error: error opening location: No application is registered as handling this file
It looks like the directory on line 2 is misspelled:
./Documemnts/sublime_text_3/sublime_text
Notice Documemnts vs. Documents

How to open some files/directories read-write, others read-only

This is similar to "Split vim window with one file read/write and one file read-only".
From the command line, I want to open files in one directory as read-write, and files in another directory as read-only. How do I do this?
For example:
vim read-write-dir/**/* read-only-dir/**/* # zsh
Listing the files individually isn't an option, there's a large number of files under each directory (I use bufExplorer).
My motivation is, I'm editing two programs in different OSX Terminal tabs, and Vim gets unhappy about a file being edited twice.
If you want to open a read-only file and read-write file while starting Vim, you can use the -c option in your terminal:
vim -c ":view file_read_only" file_read_write
Then you can switch between them using :e #

htaccess - prettify a minified version

I have an .htaccess with a good number of redirects. After being modified by a Wordpress plugin, it appears that all the rules have been concatenated; at least no line breaks are visible.
Edit:
This seems to be a problem only when the file is opened in Windows Notepad. When I open it with Sublime, or even copy a snippet to here, it shows the line breaks. I toggled line-wrap in Notepad, but it still treats the whole thing as a single line.
This seems to be a problem only when the file is opened in Windows Notepad.
This is because the file has non-Windows line endings (\r\n), but probably Linux line endings (\n). Windows Notepad only recognizes Windows line endings.
You can use Notepad++ to convert line endings, but this does not stop Wordpress to apply the linux line endings, obviously.

Resources