I want to move the folder once it stops receiving data. The sign to tell when the folder is ready is the number of files in it. Here, once the folder has 27 files, it tells me it is "ready". An example, S46 has 62 subfolders with similar pattern S46_005, S46_007 ---> S46_127. Some may not have 27 files, so leave those. Eventually all the 62 subfolders will be grouped into a master folder S46. My BASH code:
I always got error:
It seems related to the variable $a. What did I miss with my code? Thanks!
Ahh, should have spotted that by myself. Mixed up with my C practice these days.
I am aware Once it stops recieving files, and having 27 files is quite diffrent. From my example, the file is small and writing is fast so that I assumed (!) once with 27 files, the folder is ready.
Do you have some scripts for that?
Thanks!
Then, let me ask a related question: How to check if a folder is ready without any further operations on it, like writing files into it for this circumstance? Googled for a while it seems no direct discussion on this.
Thanks!
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Okay, so I have a rather large text file and will have to process many more and this will save me hours of work.
I'm not very good at scripting, so bear with me please.
Working on Linux RHEL
I've been able to filter and edit and clean up using sed, but I have a problem with moving lines.
... (9 Replies)
Hi All
It's me again with another huge txt files. :confused:
What I have:
- I have 33 huge txt files in a folder.
- I have thousands of line in this txt file which contain many the letter "x" in them.
- Some of them have more than one "x" character in the line.
What I want to achieve:... (8 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Everyone,
if my folder "foldera" inside has one file.
so if i do
if ($df =~ /^\./) { next; }
then i will get
###
filea
###
if i want to have
###
..
filea
###
means also display the parent .., how should i modify the perl ~// in my code?
Thanks
---------- Post updated... (6 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)