For our school assignment, we have to implement input/output redirection. I managed to get the input and output redirection work, but I am facing an issue with append redirection. I am using testfile.txt: When the user types ls >> testfile.txt, I expect the output from ls to be added to the testfile. At this moment, the test lines get replaced
Tag: unix
why crontab run my shell script successfully but failed to start my binary file program?
i made a shell script like the following: then I use crontab to start it at a fixed time. The result is: crontab run this script(a.log exsited and i can see the log from /var/log/cron , also it shows crontab run it) but mybin is not running (mybin is a while(true) loop program) I can run the script manually from
Unable to build GNU automake – help2man can’t get `–help’ info from automake-1.16
I’m trying to compile and build automake 1.16 and it fails in the following way: I have searched and found similar issues on Stackoverflow and Github where the solution is to “yum install perl-Thread-Queue” But I do not have root access. How do I go about compiling automake successfully without installing “perl-Thread-Queue”? I need this specific version of automake for
How do I get just the filename from lsof?
I want to use lsof to create a list of open files in a folder. I’m using macOS, but understand this is common to *nix. In man lsof, it seems the the -Fn option is closest to what I want, but I can’t get further than that. I’m piping to cut to get to just the filename. So this is
Using $() in docker commands doesn’t seem to work
I want to stop all running docker containers with the command sudo docker stop $(docker ps -a -q). But when I run it, docker outputs Just running docker ps -a -q outputs the Docker IDs, but when I combine it with a Docker command, it doesn’t work. Thank you. Answer I didn’t realize that the sudo is required in the
How To Use Gregorian Timestamp In Curl String
I’m trying to work with a curl request and the following string: I’ve been working with the documentation quite a bit, so I know that brackets are not needed. Unfortunately, the only information I have is to us “Gregorian Timestamp” which I haven’t found a lot of documentation on. I have tried a number of different combinations. Using timestamps for
awk: print the average of each students along with the given details using different separator
File which named as Input.txt has following data as name, class, schoolName, marks1 and marks2 with # separator: Using above file print all the details along with average using | separator as output. My answer: I tried one more command as: Output looks like this: Please help me out to get the desired output. Answer You have to set FS
compare two words, 1st word = file name appended with date and 2nd word = just date alone. compare should display the lines with different date [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 am writing a script to compare the file name appended with date(YYY-MM-DD) with date of the file modified. Example:
ASCII Text Browser Vs. cURL
I hit this url : http://artii.herokuapp.com/make?text=abc+art&font=smisome1 I see this Then when I curl exact same URL curl http://artii.herokuapp.com/make?text=abc+art&font=smisome1 I got this 🤦🏻♂️ Does anyone know why this is happening ? Is there a specific flag in the curl I should pass to make it return the same result as broswer ? How do I get my Terminal to display the
Access List of Items from cURL Result
If u go to this url : http://artii.herokuapp.com/fonts_list, you will see a list of 417 items on the list. I’m trying to create a variable to store/access those list. I could not get it to work. I kept getting Any hints on how to do it ? Answer Starting with the assumption that the result is, in fact, one font