what happens if the number of filenames in the list are not evenly divisible by 4?
Try this:
This is a safer and more general approach. The simple answer to your last question: you would have to develop an application that ran system() calls as worker threads, with a job control thread feeding the worker threads the new jobs as they become free.
This User Gave Thanks to jim mcnamara For This Post:
you would have to develop an application that ran system() calls as worker threads, with a job control thread feeding the worker threads the new jobs as they become free.
I'm trying to resolve the below scenario by writing bash script.
On my managed linux server I have about 30 accounts and there is not enough space to generate full 30 accounts backup in one go and transfer it via SFTP to my Backup Synology Server. What I'm thinking of doing is breaking the... (3 Replies)
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Hi All,
I am trying to run a do while for an array. And in the do while, I'm trying to get a user response. Depending on the the answer, I go ahead and do something or I move on to next element in the array.
So far I can read the array, but I can't get the if statement to work. Any suggestions... (5 Replies)
Hi
I have a script that performs a process on a file.
I want to know how to include a function to run a batch of files?
Here is my script
#!/bin/bash
#----------------------------------------------------------------------------------------------------------------------
#This... (2 Replies)
So I'm trying to read datafile into an array, with each line representing one variable in the array. I'm successful at first but somehow it keeps getting erased.
i=0
grep '.*' datafile | while read line
do
echo $i
array=$(echo $line)
echo ${array} #printing array to make sure it's... (5 Replies)
Hi
I would like to run my script to process as many as 50 files at a time.
Currently my script is being called like so:
./import.sh -f filename
so I want to call my script in this way and it must execute every file in the directory
/var/local/dsx/import (1 Reply)
Hi everyone:)
I have 2 files - IN & OUT. Example:
IN
A:13:30
B:45:40
.
.
. UNLIMITED
OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED
I want first row of numbers of IN - OUT. Example 13-12 45-20
My code is (2 Replies)
Hi all
I need to group all the lines that start with 2. For every 3 lines (that start with 2) i need to group them in one group and add 1 for each group.
I need your help to batch the files content.The file look like this:
040171011140820070000000009650244002933170003000000075272... (2 Replies)
hi ,
I need to know commands to be used in the script to invoke batches in order from other scripts and then run those batches,and how to take those logs of those batches which fails........If anyone give me a better idea to complete this entire task in a single script... (5 Replies)