I'm trying to write a simple etl process that would look for files in a directory each minute, and if so, load them onto a remote system (via a script) and then delete them.
Things that complicate this: the loading may take more than a minute.
To get around that, I figured I could move all files into a temporary processing directory, act on them there, and then delete them from there.
I cant figure out how the complete function works in tcsh.
1. I whould like it to complete after writing my_program.py with either start or stop.
I have tried to do something like this in .cshrc.user:
complete my_program.py \
'c/start/' \
'c/stop/'
However i cant get it to work. What do I do wrong?
2.
Hi All,
I am looking for a simple concise solution most likely using sed to process the following 4 rows of data from the same record and only keeps it if the second record satisfy certain critea such as surname matches up to smith or jackson:
Code:
John (firstname)
Smith (surname)
20/05/1984 (dob)
Male (gender)
It would have been possible to use AWK if the data are on the same line w
I'm writing a script in ksh. I need to find all users who have more than N processes and echo them in the shell. N is read from ksh.
I know that I should use ps -elf, but how do I parse it, find users with >N processes, and create an array with them? I'm having a little trouble with arrays in ksh. Maybe a simple solution can help me instead of having to to create an array.
I've been trying to find the issue for the last couple of days now and I'm apparently not processing this very well. It seems as though everytime I get an error, I fix that one and another one pops up. The only thing I can think of is that there's something I'm overlooking that would set it all straight.
I have setup a list of cron, Some of the cron script takes a long time to run (like 1-5 hours, and they are increasing every day). I do not want to run two cron scripts at the same time, as I do not have the resources or need for it. I need to find a solution so that the scheduled scripts will not start until the other previous script has finished.
So in UNIX, I understand that there are several different shells you can be in: C, Bourne, Bourne Again, Korn, etc. I also know that you can write scripts for the shells, by assigning it by #!/bin/csh, or sh, etc.
If I am working in the csh, do I have to write the script for the csh? Or can it be sh?
I am currently in Afghanistan and do not have access to some of the resources I normally do back in the US. Just accessed this site and it looks promising! Hopefully you will not find my question too much of a waste of your time.
I write mostly Korn Shell and PERL on Solaris systems for the Army.
I am just getting my feet wet in scripting and want to debug a certain script.The script basically is to perform video encoding by successively executing shell scripts generated by Acid Rip.