Sorry, I meant to answer Scrutinizer first suggestion.
I use Ubuntu Linux (14.04.0x) and I am using bash.
The problem is this:
I am using a script to download files that all have the same name "-.txt" (without the quotes) and I am trying to write a script that once it downloads the first file (-.txt) it will rename it to "1.txt" (again, without quotes) and so the second downloaded file ( also named -.txt) will be renamed 2.txt.
Since these files are large they do take some time to be downloaded (each files is ~ 120 MB)
Thank you all again
---------- Post updated at 05:55 PM ---------- Previous update was at 05:23 PM ----------
OK, problem solved. It was a bug in the downloading python script.
The script was made to download "ALL" files once launched, and therefore, it will download all files (all with name "-.txt") before the loop moves to the second command which is to rename the files.
I am to fix the bug, and then run the script.
How did I figure it out?
Out of frustration, I wrote this script:
The result was, as I expected (and hoped) 1.txt, ..., 5.txt
so I directed my attention to understand how the python script works (I did not go through the script, though) and watched it, trying to figure out why does it pass the mv command?
I then added a couple of sleep 10 commands after the downloading command and the mv command to make sure how does each step run... and this is how I figured it out.
Thank you all again for your help and suggestions....
Happy Holidays
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)
I have a .ksh script that creates an sftp batch file and runs it through sftp. It works except for one thing. If I try to "put" to a different name, it doesn't use the specified remote name...it still "puts" the original local name.
I've tried both of these, and neither work...it will always... (4 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 all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 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,
I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 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)
I have a question - beginning user, just learning unix.
I have a file that name starts with a hypen -, such as a name like :
-myfile (yes, I know shold not start files names like this, but this is the question I have to figure out, and its driving me nuts)
I know that this hyphen is like... (9 Replies)