diff on c-source file always returns "files differ"
I have a c-source file that is evidently seen by unix as a binary file. When doing a diff between it and older versions with substantial differences, diff will only return "files differ".
I have tried cat-ing the file to another file; tried using the "-h" on the diff; I have tried ftp-ing it back and forth as ascii; I have played with chmod; I have tried using dos2unix... no matter what I do I can't get Unix to see the file as a text file.
What does 'file' say? Also, you could write a small C program to filter any 'gremlin' characters, visible or not.
I used the following code to wash the problem file. The input file size was 25093, the output file size is 25093.... but the result is now "diff" sees it as text and not binary.
Glad the problem is solved. That they're the same length is very odd -- the only way that program can change the file is by excluding bytes! Thus I have found an exception to what I previously thought was a rule, that UNIX does not differentiate between text and binary files. What UNIX are you using?
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)
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)
I have two directories Dir_A and Dir_A_Arc. Need help with a shell script.
The shell script needs to take the path to these two directories as parameters $1 and $2.
The script needs to check if any files exist in these directories and if either of the directories are empty then exit... (5 Replies)
Hello All,
I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk).
When I source this file it throws error: syntax error near unexpected token... (1 Reply)
Hello,
I am supposed to check the RAID health of a system but when I type metastat it says "there are no existing databases"
Does this mean that there is no RAID configured at all? Is there any other utility I should try?
I know the system has two disks.
Tanks! (8 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)
Hello All,
i am porting my application from SunSolaris to Linux (RHEL4).
When i compile my c/c++ code i am getting the following errors.
1. catastrophic error: could not open source file "sys/elf_386.h"
#include <sys/elf_386.h>
2. catastrophic error: could not open source file... (2 Replies)
Hello,
I am new to this forums and this is my first "asking help" message!
i have 2 problems:
1- for unknown reasons the "source" command is not avalable in my system (UBUNTU). i can't either see it in my bin directory!
2- again for unknown reasons the "login.cl" file in the home... (0 Replies)
Hello,
Can anyone let me know what is the maximum file size that can be given as input for the "Diff" Command in Unix?
I have a file size as large as 28MB and which can also increase. Will I face any issues with such a file size. If yes, What is the other alternative.
Thanks in advance for... (1 Reply)
Hello,
I am trying to port some testtools we wrote from solaris to redhat linux(AMD64). If I link dynamic, set the correct LD_LIBRARY_PATH, everything runs fine.
If I try to link static, the pthread_create returns "operation not permitted" (error code 1).
Does anybody have an idea where to... (1 Reply)