Cat/tac displays nothing but vi does


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Cat/tac displays nothing but vi does
# 1  
Old 06-12-2013
Cat/tac displays nothing but vi does

Hi,
Today i have seen a file which shows nothing when i use cat/tac.
But when i use vi it displays a single line at the top.
There are no other lines. I am curious why cat/tac doesn't display that line and only vi does?

Any thoughts?

Thanks in advance,
# 2  
Old 06-12-2013
I guess there are non-printing characters in your input file.

Use -v option with cat to show non-printing characters:
Code:
cat -v file

For further reference check the man page:
Code:
man cat

This User Gave Thanks to Yoda For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Want tic tac toe project in shell...

Any body pls provide me source code of tic tac toe in shell.... (1 Reply)
Discussion started by: Pushpender Sing
1 Replies

2. Shell Programming and Scripting

Limitations of tac/cat?

As part of a quiz assigned during my unix class I was asked to write a program to ask for a file name, print read errors, and "reverse elements in a list." I used the 'tac' command in my solution, however, I was then lectured for 5 min about the "limitations" of the 'tac' command and how a 'for'... (6 Replies)
Discussion started by: 127.0.0.1
6 Replies

3. UNIX for Dummies Questions & Answers

ls -l displays size in KB, MB, GB?

Hi, ls -l displays the long listing of a file in 8 fields. Query: ------ Does ls -l display the filename size in KB or MB or GB? -rwxrwxr-x 1 xx dba 655 May 22 06:27 time Here 655 is KB or MB or GB? Many thanks. (2 Replies)
Discussion started by: venkatesht
2 Replies

4. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

5. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

6. AIX

who -r displays no output

Hello. I have an AIX machine at 6100-00. We had some strange activity since filling up /tmp. One symptom is that who -r displays no output. It doesn't hang just no output is displayed. We are going to boot the machine, but prior to that I'd like to dig a bit to see what may be causing the... (0 Replies)
Discussion started by: maficdan
0 Replies

7. HP-UX

Dual Displays HP-UX 10.20

Hello All! Where I work we have C3600's that have a video cards that have both DVI and Regular RBG type monitor ports on them. My question is: is it possible to spread my desktop across two monitors that are plugged into the one card much like you can do with NVIDIA software like NVIEW for... (0 Replies)
Discussion started by: giftedone
0 Replies

8. UNIX for Dummies Questions & Answers

Dual Displays

I have a TV and a monitor hooked up to my box. Right now the system is displaying all the information on the TV instead of the monitor, obviously I want to switch this, as the TV is very impracticle for everything other than watching movies. I thought I remembered a command I used to use that... (2 Replies)
Discussion started by: Synbios
2 Replies

9. Programming

tic tac AHHHHHHHHHHHHHHHHH

ok i am looking for a vim coad to make a tic tae toe game (dont asky why) can any one give me a URL of help :confused: :confused: :confused: (0 Replies)
Discussion started by: thepicoman
0 Replies
Login or Register to Ask a Question