Linux Terminal writing json but enter produces only a new line how to run the command - linux

i am using the Linux terminal to formulate an AWS command. After the command i have to specify the config via JSON.
So i am writing the JSON and want to trigger the command but whenever i press enter it only gives me a new line.
I am not using a specific text editor in the terminal.
I know this is a stupid question but i am searching now for an hour but i cant find the correct shortcut. I would really appreciate if somebody could give me a hint.
Thank you very much.

Have a look at you quotation marks If they are closed properly, it wont give you a new line.

Related

How to run selected text using keyboard shortcut joined together with a command in background?

I am trying to be able to select text anywhere within my manjaro linux system and run it along with a TTS text to speech program. The program is called google_speech and it got a really clear default voice and is really easy to use, however I am finding it hard to implement what I want to do with it...
The program is ran by the following command:
$ google_speech -l en "I am just a robot but one day I plan to rule humans"
so I am trying to be able to select text and press a keyboard shortcut and the text will automatically be importing here:
$ google_speech -l en "HERE"
and ran as a command in the background hopefully without having to open a terminal window but if so then thats totally fine... I was thinking xclip would be able to do this but I can figure out what command or options I need to be using... my research so farhas gotten me nowhere...
Thanks you so much for your time and skills...

Log all terminal commands in file

I've tried this solution: https://askubuntu.com/a/858319
It works good but the only trouble with syslog is that commands from SCREEN can't be logged.
If someone tried anything else, or knows better way to log all inputted commands in Linux terminal?
Use script. It saves everything including the output.

python3 input using sublime text 3

I am trying to use the input feature on python for my program. I installed SublimeREPL but I still cant seem to figure out how to provide an input for my program. (coming from a complete beginner)
Using input from within an editor can be tricky. A simple solution would be to run your program from the command line. Open a terminal and change into the directory where your script user_inputs_intro.py is located and type:
python user_inputs_intro.py
Now, you will see the Tell me something: and should be able to type something that will be echoed back after you press enter.

Easy way to colour ALL user input in terminal?

I know that there is lots of info for colouring the output of certain commands, but I want to have a specific colour for everything I write into the Mac terminal.
It would allow me to have a special colour for everything I input - not the output, just the code I personally input - making it easy to scan the code to where the last command was. I want to find a way to do it without having to write a colour alias for every single command - A way that by default will implement a unique colour for everything I write in the terminal.
Thanks for your help.
I have now sorted this...
Open your ~/.bash_profile in whatever editor you prefer.
Add the following code:
export PS1="\e[0;32m[\u#\h \W]\$ \e[m"
and save.
You will now see that your command prompt is coloured green, and it's super easy to find yourself in the terminal :)
Hope that's helpful for anyone trying to fix the same problem!
P.S> These instructions cover more than just the colour in the terminal... They also control what it shown in your command prompt. I'm afraid that it will need someone way more advanced at coding than me to decipher which bit refers to what... Sorry!

Node command line interface change

I'm making a command interface for a node server, but I have reached a point that I want it to look better.
I want to have the console so you enter a command at the bottom of the terminal screen, you hit enter, and it adds the reply to the actual command line.
If you have ever run a minecraft bukkit server from the command line, you should know what I'm talking about.
Here's a picture of what I'm talking about if you still don't understand. Imagine this was in terminal, and ignore the scroll bars: http://cl.ly/1K0h1V0r0H3f3U3t3L22
Is there anyway to set the console to look like this without having to make your own program for it or having the screen reprint all the other info to fake that look?
I have not done this, but I believe something similar is possible with very little effort by using Node.js REPL. You can override the eval parameter to provide your own command processing.
It would not have the exact look you are wanting, but it will be an interactive prompt that you can utilize (more similar to a Windows command shell or a Linux shell).
If you want the exact look from your screenshot, I don't believe that there is any Node.js module that will help you. There are some that allow you to use colors in the console, and some basic highlighting (e.g. bold), but nothing that gives you complete control over the console screen.

Resources