I have a backup of all my mp3s files in one folder. Would there be a bash command to automatically move all files in their own band-album title directories that would be created on the fly? As you can see in the image, first words before dash are artist names, then comes the album title, then comes the name o…
Tag: bash
How to write shell script,to automate file conversion?
I have 30 files(ascii),which I want convert to binary.Linux command line(FORTRAN 77 CODE) that has been compiled Relevant part of the code Then code asks for input and output file names How to automate this?I have tried like this Or But I do not have a clue for next step.Text files are Output files Answer Try…
Insert space between numbers after matching specific pattern [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 have the following temperature data that needs to be manipulated. Though…
install mysql 5.7 purely from bash script on Ubuntu
I want a bash script that installs a MySQL 5.7 instance without needing any manual input. I was following the tutorial on Digital Ocean and it says for 5.7 you have to run the following commands and then put commands into a prompt (screenshot below). How can I automate the installation if it requires me to us…
bash command fails in tomcat/java Runtime.getRuntime.exec(), but works from command line
I have a tomcat webapp that runs a process in the shell because several of the utilities are not available in java. This code works perfectly on other machines, but there is a mysterious problem on my public server. I print the string to the log, and it looks like this: (path/to/ is not the actual paths) If I…
Export value of corresponding site out to a new text file
I have a text file that contains two columns of data, the first column being a site ID and the second being a value. If the value is equal to 0, I want to send the corresponding site ID out to a new file. If the value is equal to 15, I want to do nothing. Text File: Attempted Script:
Background rsync and pid from a shell script
I have a shell script that does a backup. I set this script in a cron but the problem is that the backup is heavy so it is possible to execute a second rsync before the first ends up. I thought to launch rsync in a script and then get PID and write a file that script checks if the
sudo -H -u git gitosis-init < ~/id_rsa.pub | error: no such file or directory
I got this shell script from a blog about how to equip git with gitosis. But i got a “No such file or directory” error after running the script. I am puzzled,as the man manual says that: ,which is cited from linux manual. The -H option just sets the HOME environment variable to the homedir of the …
C Corrupted double-linked list after calling chdir
I’ve been working on some C code to provide functionality similar to the shell. So far it can run most commands like cat, ls, ls | grep …, etc. After writing code to implement the functions “cd”, “pwd”, “pushd” and “popd”, I have been testing it. If …
Can a program leave no traces behind when handling passwords?
There is a script that generates a passwords and stores it in a variable and in a file. Then the password in the variable is used to encrypt another file. That’s it! Now that is not hard to write the hard part is: Can you delete all traces? Because from what I have read the commands in the script (and