Display first few characters only


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Display first few characters only
# 1  
Old 08-17-2009
Display first few characters only

I have a file with one or two lengthy lines like....
masterUserID = 'S' OR masterUserID = 'S' OR masterUserID = 'S' (many many more times)

How do I display only the first few hundred characters from each line.

# 2  
Old 08-17-2009
Code:
cut -c1-100 < filename

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to display Chinese and Japanese Characters on Rhel 6?

Hello, I'm trying to figure out how to display Chinese and Japanese Characters on my RHEL 6 Console. There is no more "bogl-bterm" for RHEL6, that is not supported anymore. Is there any way that I could display them? Thank you. (2 Replies)
Discussion started by: pjeedu2247
2 Replies

2. Shell Programming and Scripting

Display unicode characters in zos shell

Hi all, I have a shell script that has several strings with \uxxxx characters distributed within. I would like to display these characters when I execute the script and echo the strings. I am running on zos in an sh environment. Some strings look like this: "Chcete-li pou\u017e\u00edt" <---... (1 Reply)
Discussion started by: adam.wis
1 Replies

3. UNIX for Dummies Questions & Answers

Display only the first two characters of all the lines from a file.

how do i Display only the first two characters of all the lines from a file.? (1 Reply)
Discussion started by: ritusubash
1 Replies

4. UNIX and Linux Applications

Display non-english characters in shell

I don't know if this is the correct thread to post. If not tell me please. I have a script to make some queries to a Spanish Dictionay (Real Academia Espaņola) as follows: lynx -dump --nolist "buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_ HTML=2&LEMA="$1 It works this way: ./rae word ... (1 Reply)
Discussion started by: agasamapetilon
1 Replies

5. Shell Programming and Scripting

Display text between two words/characters

Using sed or awk, I need to display text between two words/characters. Below are two example inputs and the desired output. In a nutshell, I need the date-range value between the quotes (but only the first occurance of date-range as there can be more than one). Example One Input: xml-report... (1 Reply)
Discussion started by: cmichaelson
1 Replies

6. Shell Programming and Scripting

2D Array to display characters

Hi All, I have a series of number which indicates the coordinates where 0104 indicates X-coord = 01 and Y-coord = 04 and i want characters to form up in accordance to the coordinates given. Can any expert give me an example of 2D array code using csh or awk or perl such that the code can... (16 Replies)
Discussion started by: Raynon
16 Replies

7. Shell Programming and Scripting

Display special characters

I have a file that evidently has some special characters in it. Is there a Unix command that I can use tp display the file so I can see the octal or hex values? (2 Replies)
Discussion started by: BCarlson
2 Replies

8. Programming

Unknow Characters in Display using ncurses

Hi Dear, I have written a small C/C++ aplication which is using ncurses library. When the application runs, some times some unknown characters are displayed on the screen. It happens some times and on some pc's. I have used "mvwprintw" for displaying text of my own will and proper use of... (1 Reply)
Discussion started by: iali
1 Replies

9. UNIX for Dummies Questions & Answers

Garbage characters in display

:confused: I recently left managment and came back to AIX administration. So I am a bit rusty to say the least. The issue I am having is with the term settings when I either simply telnet to my AIX unit or even when I use an emulator like puTTY or a VAR provided one. Once I am logged into... (0 Replies)
Discussion started by: Haleja001
0 Replies

10. AIX

Display EBCDIC as Characters

Hi, Does anybody have a command to share that will display EBCDIC files as character? I have od -x -A d which will display hex as follows f0f1 f4f3 f0f0 f0f0 f0f6 f1f4 f6f3 f3f0 f3f9 f8f3 f1f6 f8f2 f860 d1e4 d360 f2f0 f0f5 4000 0000 5014 8c00 0000 0000 0c00 0000 0000 0d00 0000 5014 8c00... (1 Reply)
Discussion started by: LouPelagalli
1 Replies
Login or Register to Ask a Question