0
votes
1answer
40 views

find files older than create its parent folder in a directory and move them there

I've been trying to create a bash script that does the following. Use the find command to search for files older than 7 days (find . -type f -mtime +7 ! -iname '.*', take the parent directory(of the ...
2
votes
2answers
346 views

concatenate files including path in header - path contains spaces

I have to concatenate a number of files in a directory structure which contains spaces in the folder names looking like this: ./CH 0000100014/A10/11XT/11xt#001.csv find . -name "*.csv" -type f ...
0
votes
1answer
514 views

Bash Script to Run a Command in Screen

I need to create a bash script that would open a new screen session, then run a program in tha session. Is it possible to do that? Any help appreciated.
1
vote
1answer
344 views

How to stop printf from printing escape codes in shell script?

When I run a simple shell script with the following code: #!/bin/sh printf "\e[32m Hello World\n" I get \e[32m Hello World as output as opposed to a green Hello World output.