Search Results

Search: Posts Made By: sadique.manzar
2,366
Posted By RudiC
@punpun26262626: Welcome to the forum. It is...
@punpun26262626: Welcome to the forum.
It is usually well received in here if you put some more effort into formulating the spec than "Now please advise". What OS / shell / tools versions do you...
2,073
Posted By RudiC
Any results prior to exiting, like output or...
Any results prior to exiting, like output or error messages? Did you try with the -x option set?
5,365
Posted By RudiC
So - now the value is in a variable, not a file?...
So - now the value is in a variable, not a file? Your request becomes confusing.
5,365
Posted By Don Cragun
Kindly tell us what operating system and shell...
Kindly tell us what operating system and shell you're using. (Which, as you know, you should tell us every time you start a thread in the Shell Programming and Scripting forum.)

With a POSIX...
5,365
Posted By RudiC
Try - if your shell provides "process...
Try - if your shell provides "process substitution" -

date -f<(sed -r 's/([0-9]{8})([0-9]{2})([0-9]{2})([0-9]{2})/\1 \2:\3:\4/' file) "+%s"
1538666471
1538666473
1538666473
.
.
.or
sed -r...
5,365
Posted By RudiC
Yes, of course - if you answer my question.
Yes, of course - if you answer my question.
5,365
Posted By RudiC
And, how is that extracted and presented to date?
And, how is that extracted and presented to date?
5,365
Posted By RudiC
date -d "20181004 17:20:00" "+%s" 1538666400...
date -d "20181004 17:20:00" "+%s"
1538666400 works. Is that string stored in a variable? A file?
3,085
Posted By MadeInGermany
In post#1 you had an attempt to run a remote...
In post#1 you had an attempt to run a remote command and redirect its output to a local file:
ssh -nqx $dpi_srvr_42 -p 22 "
ls $dpi_42_sourceFilesDir/fixed | grep '\.tgz$'
" >...
3,085
Posted By RudiC
Are you aware that your ssh login does an echo...
Are you aware that your ssh login does an echo 2>&1 and immediately quits? The entire if ... fi branch is executed on the local node.
3,085
Posted By Don Cragun
I would strongly suggest running your script with...
I would strongly suggest running your script with tracing enabled. In other words, add the line:
set -xv
immediately after the first line of your script:
#!/bin/bash

Your inconsistent variable...
2,918
Posted By RudiC
Why not check the modified date of the directory...
Why not check the modified date of the directory itself? With the assumption that nothing else is going on there (any maintenance to be considered separately), it should represent the last file's...
2,918
Posted By Skrynesaver
So every 10 minutes, check the directory and if...
So every 10 minutes, check the directory and if the most recent file is greater than 10 minutes old send a mail with the subject "No new files seen since ${LATEST_FILE_TIMESTAMP}"

You can use cron...
1,594
Posted By Chubler_XL
You could also try: awk 'NF==27 {$19=$19...
You could also try:

awk 'NF==27 {$19=$19 $20; for(i=20;i<NF;i++) $i=$(i+1);NF--}1' FS='|' OFS='|' COMPLAINT_EVENT_TWO.processing

Which avoids using the dummy =-= string.
1,594
Posted By rdrtx1
awk 'NF==27 {$19=$19 $20; $20="=-="; sub("\\|"...
awk 'NF==27 {$19=$19 $20; $20="=-="; sub("\\|" $19 "\\|=-=\\|", "|" $19 "|")} {print $0}' FS="|" OFS="|" COMPLAINT_EVENT_TWO.processing
2,669
Posted By RudiC
man comm
man comm
2,669
Posted By RudiC
The output of above IS the reduced file list....
The output of above IS the reduced file list. Capture it and mv to original file list.
1,018
Posted By RudiC
OK, brilliant, that's a start (talking of...
OK, brilliant, that's a start (talking of post#5)! You did not yet specify how those parameter(s) should look like ... one parameter, several characters/numbers?

Did you read bash's man page on...
1,018
Posted By RudiC
"Like that" is not too precise a specification....
"Like that" is not too precise a specification. With a vague request like above I'm afraid yo need to be content with fuzzy answers. Like:
Use a case statement to scan through the possible parameter...
1,018
Posted By RudiC
What would "argument passed at run time" look...
What would "argument passed at run time" look like? And, what does "like if default" mean?
2,669
Posted By RudiC
As I tried to point out, and I don't know how to...
As I tried to point out, and I don't know how to phrase it more explicitly, the output of the script IS THE NEW LISTFILE, containing ALL THE FAILURES (i.e. having deleted the successful moves) and so...
2,669
Posted By jim mcnamara
You need to take into account that the mv ...
You need to take into account that the mv command can fail. So you need to keep track of failed files.

#!/bin/bash
target=/fstest/INVESTIG/Sadiq/TEST_ARCH
> /tmp/errfile # create an empty...
2,669
Posted By rbatte1
Regarding the [[-n $line ]] you seem keep to...
Regarding the [[-n $line ]] you seem keep to have, what are you trying to achieve?

Are you worried about blank input lines perhaps? If so, maybe this would be better:-while read line
do
[[...
2,669
Posted By RudiC
You say another process has the input filelist...
You say another process has the input filelist open for writing randomly and simultaneously? Then your request can't be fulfilled without implementing locking mechanisms, esp. in that other program....
2,669
Posted By RudiC
Appending? No way - if you run the snippet as...
Appending? No way - if you run the snippet as given. I've (reluctantly) built your sceanrio from post#6 but removed file003.bin from the input file. Result:
while read line; do cp -v $line /tmp/;...
Showing results 1 to 25 of 63

 
All times are GMT -4. The time now is 01:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy