AWK Program File Help

I have some .dat files that I cannot open and read the data. It is an awk program file, and my question would be to you all is there a way to convert this awk file to ascii text?

Thanks

Is that a permission problem that you are not able to read the corresponding file?

What do you mean by converting an awk file to ascii file?

Do you mean renaming ? ( You need proper permissions for that ! )

If not!
please do explain. :slight_smile:

Well the permission issues are fine they are rw-rw-rw under a user which is my boss. I have another folder of .dat files that are in ascii text and I can read them in a text editor and do what i need too. The .dat files in this certain folder are awk program file type, which in windows its all jibberish. So I suppose if the files are converting to ascii from awk the files may become readable.

awk programs are readable text. I am guessing that you did a "file something.dat" and file said it was an "awk program". file is often wrong.

yes perderabo I did a addai003.dat for example and the file command did say its an awk program file. I have other .dat that are ascii text in another folder and those are I can open and read.

If the file command gave you a response, it could read the file. You need to specify what you mean by "readable". If you can copy the file to /dev/null via "cp something.dat /dev/null" then the file is readable. You cannot open all readable files with a text editor because they not be text. The name of the file extention such as .dat means very little to unix (with a few exceptions). In general .dat is used to mean a data file not intended for used by standard os programs. You might try "od something.dat".

Well what I mean by readable is the file has text ran from insurance testing with my company fm global. It is suppose to be readable so the data from the test is located in that .dat file. It is all text and should be able to open in a text editor but just this one folder of .dat files can be opened by not readable. Meaning it looks like hex and binary combined which to someone like me or an engineer that needs the file its useless.

Does anyone have any feedback for me on my issue?

I am still wondering about the awk file that I have that could possibly be corrupt but I want to confirm if there is a way to convert this file into an ascii text file. Thanks

First there is no such thing as an AWK file. An awk program file is a shell script form of a series of commands! It is an ASCII text file and nothing more!! Have you tried running the more command against the .dat file as in the command more filename.dat. This should show what is in the file and If it is rubbish then possibly the file is corrupt. There is no way of converting it as there is no way to tell what the rubbish in the file should mean! Now I have explained what you possibly have please stop calling it an AWK file.

Ok Thanks john. Well I am calling it an awk file because when I ran the file command on the linux box it called these files awk program files, and he stated that awk was similar to a text editing program that my company has. I will try to run the command and see where that takes me. Thanks