All Questions
9 questions
0
votes
1
answer
189
views
Perform loop in HPC within multiple subdirectories one after another
I know this is a repeated question, but none of the suggestions I saw kinda fit what I wanted.
I'm working with an HPC cluster that has different modules to perform different actions for high ...
1
vote
0
answers
35
views
do a recursive file compare for newness and report
I have Ubuntu 16.04 and have been using Dropbox over the years and found it solid in reliability.
Recently started using Zoho docs and like it, but I find its syncing flaky. I would like to continue ...
0
votes
2
answers
201
views
zip files within all sub-directories of a given parent directory
Say I have a parent_directory/ with the following sub-directories child1/, child2/ and child3/.
How do I script to zip all *.txt files in childx/ into childx.zip
I also want this childx.zip to be ...
4
votes
1
answer
2k
views
Recursive call script
I am trying to make a script that will list all files and directories in a given directory. I want to make this script to call itself, in the end showing all files and directories. I know that you can ...
0
votes
1
answer
71
views
Bug in shell script for printing the tree-like structure of the curent diretcory
I have wrote the following script:
#!/bin/bash
if [ $# -eq 0 ]
then
read current_dir
else
current_dir=$1
fi
function print_tree_representation ()
{
for file in `ls -A $1`
do
...
5
votes
2
answers
11k
views
Change Directory and execute command automatically then change directory back out
I'm attempting to write a script that will be run in a given directory with many single level sub directories. The script will cd into each of the sub directories, execute a command on the files in ...
3
votes
3
answers
672
views
remove all instances of _000 from multiple files
Had to recover my music library from a HDD which died.... got everything I wanted but all music track names have _000 added at the end.
I really don't fancy going through 8000 individual music tracks ...
3
votes
3
answers
3k
views
Help searching in files for regex patterns, recursively, with specialized output
My problem is that I need to:
Find all lines matching regex_pattern in all files (deep search) in a given root directory
For each line that matches, output:
File name
Line number containing the match
...
1
vote
2
answers
693
views
Direct recursive shell script output to each subdirectory, not parent directory
I'm processing a batch of subjects data recursively, calling the script within the parent directory.
For example, I have the parent directory:
/home/subjects
and the subdirectories which contain the ...