Search Results

Search: Posts Made By: aimy
1,948
Posted By Don Cragun
I would be very surprised if the command: ...
I would be very surprised if the command:
filename=INPUT_GIANT_*csv
ever did what you think it did. If you type in that command manually at a terminal while sitting in a directory where one file...
1,948
Posted By Don Cragun
Change: filename=INPUT_GIANT_*csvto: ...
Change:
filename=INPUT_GIANT_*csvto:
filename=$(printf '%s\n' INPUT_GIANT_*csv)
to fix your immediate problem. However, this will not work if the filename matching pattern INPUT_GIANT_*csv...
2,803
Posted By Don Cragun
The 1st operand to find is the name of a file...
The 1st operand to find is the name of a file (usually of type directory) to be tested or operated on by the primaries specified by later operands. The diagnostic you got is saying that find was not...
2,803
Posted By Don Cragun
It isn't a problem; I just wanted to be sure your...
It isn't a problem; I just wanted to be sure your problem had been fixed. I'm glad my suggestion worked.

The size reported by the lstat() system call for a directory varies depending on...
2,803
Posted By Don Cragun
Hi aimy, You're welcome. Is the output you...
Hi aimy,
You're welcome.

Is the output you showed us from your original script, or from my suggested modification? I'm not clear as to whether or not the "neat output" my suggestion provided...
2,803
Posted By Don Cragun
Please show us the ls -la output for the file...
Please show us the ls -la output for the file that has size 89 bytes. That find command shouldn't show you anything for files smaller than 512000 bytes. Unless you have a huge directory, it...
1,384
Posted By hicksd8
Yes, you could use 'mtime' to exclude these files...
Yes, you could use 'mtime' to exclude these files but there are many ways of doing this and I'm sure you'll get a number of ideas posted here.

Having done this kind of thing countless times my...
1,384
Posted By Chubler_XL
You could use perl to fetch the file's...
You could use perl to fetch the file's modification time and compare it to the current time like this:

PROC_FILE="/var/dump/trn_20163002.24"
FILETIME=$(perl -e 'printf "%d",((stat(shift))[9])'...
1,384
Posted By Chubler_XL
You don't mention what OS you are running on. ...
You don't mention what OS you are running on.


If you OS has lsof installed you may be able to do something like:


if lsof -- "$PROC_FILE" > /dev/null
then
echo "$PROC_FILE is busy -...
9,986
Posted By Don Cragun
UNIX format text files have a newline character...
UNIX format text files have a newline character as a line terminator. DOS format text file have a carriage-return character immediately followed by a newline character with the combination of those...
9,986
Posted By Don Cragun
Try: tr '\r' '\n' < INPUT_GIANT_JAN2016.txt >...
Try:
tr '\r' '\n' < INPUT_GIANT_JAN2016.txt > FIXED_INPUT_GIANT_JAN2016.txt
3,778
Posted By blastit.fr
Maybe my suggestion is outside your main concern...
Maybe my suggestion is outside your main concern on temp files, but you can also try this.
Both input files should be sorted
$ join -t\@ -v1 incomplete.list source.list

join is a very...
3,778
Posted By RudiC
Well, there might be. Trycut -c 1-25 source.list...
Well, there might be. Trycut -c 1-25 source.list | grep -vxFf - complete.list The -f - will use stdin as the pattern file.
3,778
Posted By Aia
If was possible to just do: cut -c 1-25...
If was possible to just do:

cut -c 1-25 source.list > source.temp && grep -vxFf source.temp complete.list > missing.list; rm -f source.temp
which will try to delete source.temp regardless of any...
3,778
Posted By Aia
If that is an issue then try: cut -c 1-25...
If that is an issue then try:

cut -c 1-25 source.list > source.temp && grep -vxFf source.temp complete.list > missing.list; [ -e source.temp ] && rm -f source.temp


---------- Post updated at...
3,778
Posted By RudiC
No, it is not. The first, although missing a...
No, it is not. The first, although missing a closing parenthesis, is called "process substitution" and offers cut's results as a stream on stdin for grep.
The second offers cut's results as a list...
3,778
Posted By jim mcnamara
For HPUX /sbin/sh is a POSIX-compliant shell. ...
For HPUX /sbin/sh is a POSIX-compliant shell. POSIX does not require process substitution, which is what you are asking for. Out of the box 11i HPUX has /bin/ksh which does support it.

This...
3,778
Posted By vgersh99
echo $0
echo $0
3,778
Posted By Chubler_XL
What OS are you on, does your system have...
What OS are you on, does your system have /dev/fd/?

If so, you could consider using bash or ksh shells. Basically if the <(command) works your system supports it.

This is not very portable and...
3,778
Posted By Chubler_XL
This is a fairly new feature and is not available...
This is a fairly new feature and is not available in a lot of shells yet. I know it's supported in the bash shell and ksh93.
3,778
Posted By Chubler_XL
Yes what you describe is process substiution and...
Yes what you describe is process substiution and it works like this:

grep -vxFf incomplete.list <(cut -c 1-25 source.list)
3,778
Posted By Aia
Do you mean like this? cut -c 1-25...
Do you mean like this?

cut -c 1-25 source.list | grep -vxFf incomplete.list
2,572
Posted By Scrutinizer
With the original script in post #5 you could...
With the original script in post #5 you could send to multiple recipients by using commas:
sh /EDWH-DMT02/script/MISC/email_v1.sh "my_email@company.com,my_email2@company.com,..." "$SUBJECT"...
2,572
Posted By Chubler_XL
I'd rewrite your script like this: # Author:...
I'd rewrite your script like this:

# Author: Mohd Suhaimi Shariff
# Template for HTML E-mail
# 1st creation: Friday, May 18, 2012 04:07:14 PM
# 2nd creation: (add multi receipients)
[ $# -lt 3...
2,572
Posted By Scrutinizer
What is the output of { echo "FIRST" ; cat...
What is the output of { echo "FIRST" ; cat ftp_list.txt ; echo "LAST" ; } If that looks normal then perhaps there is something fishy in the mail system...
What is your OS and version ?
Showing results 1 to 25 of 36

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