![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Error with my file
Hi, I have a file like this (tab seperated): Code:
title number JR 2 JR 2 JR 4 JR 5 NM 5 NM 8 NM 2 NM 8 this code: Code:
awk '!/^$/{a[$1]=a[$1]" "$2} END {for ( i in a) {print i,a[i]}}' filename
converts the above files into a file that looks like this: Code:
JR 2 2 4 5 NM 5 8 2 8 Hoever the problem that i am having is that the new file cant be read? so there is something wrong with the file after (like I cant modify it with grep, awk or anything). Perhaps it may be the line endings... can someone assist me? thanks
|
|
|||
|
hi there is no error message
like when I opent eh file there is characters... but when I run cat, awk or any of the commands, a blank document is the result. I've run commands many times so its not the code that im using. I was just wondering if anyone else has run into a problem like this and whether there is a quick solution to the problem. |
|
|||
|
What are you using to "open the file"? vi? some other editor? What are the permissions on the file? Can you show me the result of an Code:
ls -al <your.filename> |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fssnap error :snapshot error: File system could not be write locked | aggadtech08 | SUN Solaris | 2 | 09-15-2009 11:12 AM |
| sqlplus error output to different error log file | tomasba | Shell Programming and Scripting | 2 | 03-25-2009 08:59 AM |
| How to Redirect the error messages from Syslog file to our own Application Log File | balasubramaniam | HP-UX | 3 | 04-17-2008 02:44 PM |
| Error checking a file from previous file size | stuck1 | Shell Programming and Scripting | 2 | 12-06-2007 08:39 AM |
| Error: Internal system error: Unable to initialize standard output file | firkus | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 04:23 PM |