I’m working on an optimization and for that I need to link a matlab code into a linux program and keep monitoring the outputs. I’d done this link using this sh below, however it wasn’t working well, since I couldn’t keep track of more than one ‘expression’. I’ve asked for help here, and I got a good solution. The solution
Tag: bash
bash scripting, handling spaces in filesnames in a for loop strange behaviour
help. everything i’ve tried has failed. I’m trying to fix up my video collection and lots of them have spaces in the names/etc I want to transcode them and I’ve written the script below, but its failing. 2 of the filenames I’m using for testing are “13 Eerie (2013).avi” and “Ace.Ventura.When.Nature.Calls.1995.720p.WEB-DL.x264-mSD.mkv” i have tried several things from using print0 on
script for deleting queues using a certain prefix
i have a file named “Output_File.txt” containing a list of local queues and i want to write a script to delete those queues. what i wrote is: the problem is that the script does delete the queues but prints for every deleted queue the following output: how can i alter the code to delete the queues without printing the output
Bash script runs one command before previous. I want them one after the other
So part of my script is as follows: In my output I see: Whereas when I ssh to the server, xyz.log does exist within ~/a/b/c/ Why is the grep statement getting executed before the echo statement? Can someone please help? Answer The problem here is that your command in backticks is being run locally, not on the remote end of
what does a if mean during variable assignment
I am going through a couple of BASH scripts. And I came across something like this Apparently the Variable VAR_S should not be empty and I am trying to wrap my head around this statement. What does if=${MY_FILE} mean here. I am trying to figure out why VAR_S is returning empty when I echo it.It seems to me like if
Comparing two files and updating second file using bash and awk and sorting the second file
I have two files with two colums in each file that I want to compare the 1st column of both files. If the value of the 1st column in the first file does not exist in the second file, I then want to append to the second file the value in the 1st column of the first file, eg firstFile.log
unexpected behaviour of ACL linux [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question
Time multiple commands running in parallel in shell and save it in file
I have a bash script for which i want to know the time it took to run for individual commands and save them in a log file. Also I need some of these commands to run as a different process. The problem I am facing is I am not able to tell which output belongs to which command for example
Convert number from text file
I have a file: id name date 1 paul 23.07 2 john 43.54 3 marie 23.4 4 alan 32.54 5 patrick 32.1 I want to print names that start with “p” and have an odd numbered id My command: grep “^p” filename | cut -d ‘ ‘ -f 2 | …. result: paul patrick Answer Awk can do it all:
Get specific column from CSV in Bash script
I have a csv with nearly a hundred of column. I am writing a bash script to get only few of those column. CSV: I did some research and found this: But it requires to put ALL the column (92 in my case…) I can’t select want I want. So I try another solution: It cannot work because of the