AWK Program File Help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers AWK Program File Help
# 1  
Old 02-12-2007
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
# 2  
Old 02-12-2007
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. Smilie
# 3  
Old 02-12-2007
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.
# 4  
Old 02-12-2007
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.
# 5  
Old 02-12-2007
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.
# 6  
Old 02-12-2007
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".
# 7  
Old 02-12-2007
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk program for 3 files

I have 3 files, as below: *File1:* 5372,5372,0,0,,1,0,1,1,0,1,0,0,0,0,0,0,1107,1107,,1.620000,1,2015-08-12,,,,,,,,,,,,,,,,,,,,,,,, 2110,2110,0,0,,0,0,1,0,0,0,0,1,1,1,1,1,1601,1601,,9.500000,1,2015-05-29,,,,,,,,,,,,,,,,,,,,,,,, ... (2 Replies)
Discussion started by: Azizieh7
2 Replies

2. Shell Programming and Scripting

If else in awk program

Hi All , I have set of input files with one of the fields as below File 1 -Field 1=BUDGET_CURR_FX File 2 -Field 1=BUDGET_MTH_AVGFX File 3 -Field 1=BUDGET_PREV Now i need to include one extra field in the new file as below Output File 1 -Field 1= BUDGET Field2=CURRENT_FX Output File... (2 Replies)
Discussion started by: Hypesslearner
2 Replies

3. Shell Programming and Scripting

Help with awk program

i have two files, one looks like this (file1): novelMiR_892 novelMiR_891, novelMiR_852 novelMiR_893 novelMiR_1661 novelMiR_854 novelMiR_1210 novelMiR_1251 novelMiR_855 novelMiR_1252 novelMiR_897 novelMiR_2336,novelMiR_2335,and the second like this... (5 Replies)
Discussion started by: dietmar13
5 Replies

4. Shell Programming and Scripting

awk program

I have a csv file as below : NAME,5a-6a,6a-7a,7a-8a,8a-9a,9a-10a,10a-11a,11a-12n,12n-1p,13p-14p,14p-15p,15p-16p,16p-17p,17p-18p,18p-19p,19p-20p,20p-21p,21p-22p,22p-23p,11p-12m, TOTALS... (6 Replies)
Discussion started by: deo_kaustubh
6 Replies

5. Shell Programming and Scripting

AWK program....

Dear All, facing problem to get data in different fields. SO i am using # to get the data.. please refer my code below... BEGIN { FS=" " } { if ( $1 == "START" ) { i = i+1; SFILENAME = FILENAME } if ( substr($1,2,8) == "filename" ) ... (1 Reply)
Discussion started by: arvindng
1 Replies

6. Shell Programming and Scripting

Problem with awk awk: program limit exceeded: sprintf buffer size=1020

Hi I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it The code is that: { if (NF==17){ print $0 }else{ fields=NF; all=$0; while... (2 Replies)
Discussion started by: fate
2 Replies

7. Shell Programming and Scripting

awk program for file comparison

Hello there, I'm trying to write an awk program in bash shell with the following three input files: File 1 1001 1 2 3 1002 4 5 6 1003 7 8 9 1004 10 11 12 File 2 1001 11 22 33 1002 44 55 66 1004 100 111 122 ... (4 Replies)
Discussion started by: kbirde
4 Replies

8. Shell Programming and Scripting

AWK program

Hi all, I have the following problem and hope someone could help me. I have 184 files, each with 5 columns (c1, c2, c3, c4, c5). I am only interrested in column 5, and would like to paste column 5 from all the 184 files into one file. I have tried the following with two files awk... (20 Replies)
Discussion started by: awkliker
20 Replies

9. UNIX for Dummies Questions & Answers

AWK Program

:(Hi all, I have a doubt in AWK program. I am writing an awk program which accepts a parameter as input and it should display the corresponding details. if the country as "US" it should be displayed as "United States of America" and the country as "IN" India should be displayed. How can I... (2 Replies)
Discussion started by: sivakumar.rj
2 Replies

10. UNIX for Dummies Questions & Answers

AWK program

Hi all, I need to grep the 3 characters from a file, and to fetch the corresponding words to that character. My file is in the following format.. The below text will be in the separate file....say file2.txt ABC This is the first text. DEF This is the second text. GH1 9.8.7890 AB1... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies
Login or Register to Ask a Question