I’m trying to send file using curl to an endpoint and save the file to the machine. Sending curl from Linux and saving it on the machine works well, but doing the same curl from Windows is adding ^M character to every end of line. I’m printing the file before saving it and can’t see ^M. Only viewing the file
Tag: terminal
What do I call the thing that signifies a new command line in the Linux terminal and can I customize it? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 2 years ago. Improve this question I’m getting accustomed to Linux (very new to it) and I was wondering if there is anything I can do to
Unable to get the absolute value of command output
So I wanted to make a simple script to keep checking the CPU temperature of my RasPi, which is stored in /sys/class/thermal/thermal_zone0/temp , and hence cat /sys/class/thermal/thermal_zone0/temp would give the temp, but like this : which essentially means 38.459 degree Celsius. I was unable to format the output to get 38.594 °C My code: The error I get: Thanks Answer
How do I display a terminal banner after clearing the terminal
so I set up my terminal banner with figlet and I really like it. But it will only be displayed after opening a new terminal. My question is: Can I somehow display a banner after I hit “clear”? Answer You’ll have to edit your .bashrc file and add the following line: Then it will start up every time you type
Extract all unique URL from log with only POST type of the request
I’ve got a log file with the such type of the records: 41.201.181.27 – [2019-04-06 18:22:02] “GET /images/stands/photo_mois.jpg HTTP/1.1” 304 – “http://example.com/popup.php?choix=mois” “Mozilla/4.0” “-” I’ve got the script for getting all records with unique URLs: cut -f4 -d” < logfile | sort -u How i need to change it for getting unique URLs with only POST type of the request?
Python datetime module problems
I’m using the datetime module in python3.7. When I run it from terminal it throws an error: Answer As you named your file datetime.py it may lead to confusion when calling it from outside. you should rename it to something else like my_datetime.py you also need to import datetime before using it
Setting signal for SIGWINCH causes output on terminal?
When I set up a signal handler for SIGWINCH that does nothing, resizing the terminal window causes a reverse ? character to show up, get several of them as I resize the window around. If I don’t setup a signal handler, that doesn’t happen. Why is it doing that and How do I stop that? More information: I dump what
how to avoid enviroment variable from resetting in WSL terminal after restart?
environment variable set (in zsh shell) in WSL disappears after restarting the terminal. I have used to set environment variable. how should I avoid env variable from resetting after restart. Answer I added environment variable in .zshrc file after reading comment of @Biswapriyo. like this- export variable_name=variable_value and now it works. I think, at every startup, scripts in .zshrc file
Undefined symbols for architecture x86_64: “_read_line”, referenced from: _insert in inventory-82371b.o
Here is the callback with -v and warnings suppressed. Here it is without warnings suppressed. But I don’t believe that they are causing the issue. Here is the code. It is a program for a very simple data base from a text book. I truly believe my problem is with the compiling. It’s been a while since I’ve used gcc
Find files with a string in filename and unzip
I have a folder full to zip files. Using linux terminal, I need to find files with a certain string in the zip file name and unzip only them to another folder. I tried the following but no luck. First, the pattern is not matching and second, I am not sure if the output could be redirected to another folder.