.bat file for launching Jupyterlab with julia [closed] - batch-file

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I always type the commands below on CMD to launch jupyterlab:
[cmd]
julia
using IJulia
jupyterlab()
I wanted to automate this process and I tried writing a .bat file test.bat and running it on CMD:
[test.bat]
echo "launching jupyterlab..."
julia
using IJulia
jupyterlab()
end
However, CMD stops reading the commands after reading the command julia at 2nd line, meaning, it doesn't run using IJulia and jupyterlab().
What is going on and what should I do?
Any information would be appreciated.

Try using julia in evaluate mode like this:
julia -e "using IJulia; jupyterlab()"

Related

Batch Get Redirect Output [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
Is something like
Input: 1 > say.bat
Output: 1
Possible?
Probably Not just wondering.
Also how would I get what was passed before the > sign?
If you know if it is possible or impossible, please try to comment so I don't have to wait forever.
If you are trying to say some text into a Batch file or any kind of file. Try these steps:
Use "echo" at the start of the script and then add your text you would like to output.
Add ">>" onto the "echo" Line and enter the file name, along with the extension of the file you would like to write to. (This will create a file if it does not exist)
For Example:
echo Hello World! >> file.txt
You will be able to use this as many times as you want.

Merge txt from a directory [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
How does one write a C program in Linux to read all text files (that is, files that end with .txt) in the current directory and to merge them all into one text file and returns a file descriptor for the new file.
You can run commands on C code ( system(cmd) ).
First write a command which concatenates all the txt file in a txt :
find . -name '*.txt' | xargs cat >> out.txt
Then call this command in c code.
Then try to open out.txt.

How to rename files using Windows command prompt with keeping first 6 characters and replace all others by fixed text? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a batch of PDF files in a folder and I am trying to rename them.
Example:
File1_20170501_data.pdf
File2_20170401_statistics.pdf
Sale2_20170404_Misc.pdf
I only want to keep the first six characters of each file name (the five characters left to underscore and the underscore) and replace everything behind with sample data.
The final file names should be:
File1_sample data.pdf
File2_sample data.pdf
Sale2_sample data.pdf
Anyone can advice which command line to use for this file renaming task?
Given your provided information at the time of this answer, one simple command should do what you need:
Ren "C:\path to\a folder\?????_*.pdf" "?????_sample data.pdf"

Open a file with a batch script and manipulate it [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am working on a big project. When a user double clicks on a file with a certain file extension it opens it with a batch and checks the file for certain keywords.
I am not asking for people to type up the code for me. I just want to know how to set a default program for a file to a batch script and then have that batch script do something with the contents of the file. How do I do this?
Depending on your windows version you should be able to:
Right click the file
Choose open with
Choose choose another app
Choose More Apps
Scroll to the bottom and Look for another app on this pc.
Select your file.
To do it via the command line (you'll need an elevated one).
ASSOC .ttt=TTTHandler
FTYPE TTTHandler=c:\temp\openttt2.bat "%1"
This will associate the batch file c:\temp\openttt2.bat with the .ttt extension.
Contents of my openttt2.bat test file:
echo Hello from ttt file opener. File passed = %1
pause

Saving DOS command to a txt file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I need to save list of DOS commands itself in a text file.
But when I am using
echo copy source_file target_file >> new_command.txt
it is writing the copy command to the file correctly but at the same time it is executing the command.
What I want is that this should only write the copy command to the file without executing it..
new_command.txt should contain
echo copy source_file target_file
I don't know why you want to do this though :)
echo echo copy source_file target_file >> new_command.txt

Resources