Display the content of the unix file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Display the content of the unix file
# 1  
Old 12-08-2010
Question Display the content of the unix file

cat is the normal unix command to display the content of a file.
Is there any program to display the content of the file.
If there is, then can you send me the code.
# 2  
Old 12-08-2010
You mean apart from cat? There are very many commands.

What's wrong with cat?
This User Gave Thanks to Scott For This Post:
# 3  
Old 12-08-2010
No, I have to include in my program. I have to display the contents of the file at the end of the program.
Can I use cat inside editor? Inside the pico
# 4  
Old 12-09-2010
more, less are other file displaying commands. Yes you can definitely use cat in your script
# 5  
Old 12-09-2010
mainly
Code:
head
tail
more
less
pg
cat
tac
strings
pr
col
paste

... and i am sure i forget a bunch of otherSmilie
# 6  
Old 12-09-2010
Quote:
Originally Posted by ctsgnb
mainly
Code:
head
tail
more
less
pg
cat
tac
strings
pr
col
paste

... and i am sure i forget a bunch of otherSmilie
Like
Code:
grep
awk
sed

which seem more suited for "catting" a file than any you mention (except cat, that you listed, but there you was cheating because cat is cat Smilie)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Log File Content - Duplication Issue

I have a shell script with 2 run time arguments. During the execution if i got any error, then it needs to redirected to a error file and in console. Also both error and output to be redirected to a log file. Error output is getting copied to err file and getting displayed in console too. But... (2 Replies)
Discussion started by: sarathy_a35
2 Replies

2. Shell Programming and Scripting

Need Suggestion, on how to constantly moniter a file and display content with in that time

Dear Gurus, I'm in a strange situation, hence need some kind of advice or possible syntax to carry on. let's say current time/date is 2013-12-18, 15:58:15 I got a file something like this, which keep getting updated with respect to time. 2013-12-18,... (4 Replies)
Discussion started by: manas_ranjan
4 Replies

3. Shell Programming and Scripting

Grep to display file name along with content in Solaris

Am using the following grep to match a particular patter in grep. grep xyz abc.txt now while i run this command, if the pattern matched, am getting the line containing xyz Output: xyz is doing some work Now if i want the file name also along with my output, what should i do Expected... (2 Replies)
Discussion started by: rituparna_gupta
2 Replies

4. Shell Programming and Scripting

Display specific lines content from the file

Hell, I want to grep certain word from file and display above 2 lines and after two lines. Here is the content of sample file. Mar 14, 2013 12:56:59 AM Agent.Agent SendTo INFO: Connection to server:7041 - Credential Transmit Successesful Mar 14, 2013 8:54:21 AM cgent SendTo WARNING:... (7 Replies)
Discussion started by: balareddy
7 Replies

5. Shell Programming and Scripting

How to copy mail content in a file in Unix

Hi Guys I want to write a script which search mail with subject line and after that I want the mail content in a file please help guys. Thanks Atul Singh (3 Replies)
Discussion started by: atul9806
3 Replies

6. Shell Programming and Scripting

Display the content in different lines in email

Hi, I am checking if a file exists or not and based on the result I am sending an email. The email part works fine but the content of the email comes in a single line and I am not able to display it in diferent lines. if ; then echo "Hi, \\n An exception exists in the process.... (3 Replies)
Discussion started by: shanth_chandra
3 Replies

7. Shell Programming and Scripting

display content between all similar tags pattern

hi, I m stuck at a point for more than 3days. My doubt is pretty simple.. I have a web page content in $content. ( got this by using LWP).. Now I want to display the content matching a pattern. I tried if($content =~ m{<div class="abc">(.*?)</div>}s){ print $1;} that will... (4 Replies)
Discussion started by: therockravi
4 Replies

8. UNIX for Dummies Questions & Answers

display files name and it's content

hello, i have a question and i'll be appreciated if you can help me with this. i have i folder let's say "users" in this folder there are files (file1, file2, file2, etc) and in each file there is a number (lets say 4 in file1) i want to display some thing like bellow file1 4... (6 Replies)
Discussion started by: dndoon
6 Replies

9. UNIX for Dummies Questions & Answers

grep/cat/more -- search in a txt file and display content from a specific "keyword"

Hi, I have a .txt file Sample: ===================== NEXT HOST ===================== AEADBAS001 ip access-list extended BLA_Incoming_Filter ip access-list extended BLA_Outgoing_Filter access-list 1 permit xxxxxxxxxxxxxx access-list 2 permit xxxxxxxxxxxxxx =====================... (4 Replies)
Discussion started by: I-1
4 Replies

10. UNIX for Dummies Questions & Answers

Cant display korean file on Unix

I got a korean file from AS/400 machine and save it in a AIX Server (using ftp command). The file is converting to CCSID 949 (korean character) and CCSID 13488 (unicode) respectively. It is no problem to view 2 file by using F-Secure SSH Client (command more)from a window Xp (locale : Korean).... (0 Replies)
Discussion started by: hahahafung
0 Replies
Login or Register to Ask a Question