Sponsored Content
Top Forums Shell Programming and Scripting want to grep only strings in a file? Post 302253464 by balan_mca on Friday 31st of October 2008 04:28:25 PM
Old 10-31-2008
want to grep only strings in a file?

Hai,

Just want to print only alphanumeric in a file

ex:-

fdsdsklf#@^%$#hf

output:- fdsdsklfhf

plz, help meSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep strings from file and put in Column

Dear Experts, My file contains below- GET:SUB:ISI,432350414557432; RESP:0:MD,019352020633:ISI,432350414557432:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,1:BOIC,0:BIRO,0:BORO,0:PAID,1; GET:SUB:ISI,432350414581060;... (2 Replies)
Discussion started by: thepurple
2 Replies

2. Shell Programming and Scripting

grep a string in the lines between 2 strings of a file

Hi , Please help me with the following problem: I have an xml file with the following lines <cisco:name> <cisco:mdNm>Cisco Device 7500 A Series</cisco:mdNm> <cisco:meNm>10.1.100.19</cisco:meNm> <cisco:ehNm>/shelf=1</cisco:ehNm> <cisco:subname> <cisco:sptp>Cisco PortA... (8 Replies)
Discussion started by: bhagirathi
8 Replies

3. Shell Programming and Scripting

grep two strings in a file..

Hello All, I have a big file about 1000 lines. Now i am trying to grep a particular string and printing the lines from the string. say for example in 500th line i have the date as "Mon Wed 14 20:15:24 2010". now i in my case i need to grep the combination of the strings "Mon Wed 14" and the... (7 Replies)
Discussion started by: intiraju
7 Replies

4. UNIX for Dummies Questions & Answers

grep command to find multiple strings in multiple lines in a file.

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. I am writing it another way to make it clear, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies

5. Shell Programming and Scripting

Delete lines in file containing duplicate strings, keeping longer strings

The question is not as simple as the title... I have a file, it looks like this <string name="string1">RZ-LED</string> <string name="string2">2.0</string> <string name="string2">Version 2.0</string> <string name="string3">BP</string> I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies

6. Shell Programming and Scripting

Grep and replace multiple strings in a file with multiple filenames in a file

Hi, I have a file containing list of strings like i: Pink Yellow Green and I have file having list of file names in a directory j : a b c d Where j contains of a ,b,c,d are as follows a: Pink (3 Replies)
Discussion started by: madabhg
3 Replies

7. Shell Programming and Scripting

Grep multiple strings in a file

Consider i have the below data in my log file. i want to grep using "Monday" and "Working" So the only output i expect is Can you help me with the grep query for Sun Sparc ? Usage: grep -hblcnsviw pattern file . . . (8 Replies)
Discussion started by: mohtashims
8 Replies

8. UNIX for Beginners Questions & Answers

Use strings from nth field from one file to match strings in entire line in another file, awk

I cannot seem to get what should be a simple awk one-liner to work correctly and cannot figure out why. I would like to use patterns from a specific field in one file as regex to search for matching strings in the entire line ($0) of another file. I would like to output the lines of File2 which... (1 Reply)
Discussion started by: jvoot
1 Replies

9. UNIX for Beginners Questions & Answers

Grep: Retrieve two strings from one file to find them anyone on line in another file

I am having trouble matching *two* strings from one file anywhere in a line of a second file, and could use some help getting this figured out. My preference would be to use grep for this because I would like to take advantage of its -A option. The latter is due to the fact that I would like both... (2 Replies)
Discussion started by: jvoot
2 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
jtops(1)							   User Commands							  jtops(1)

NAME
jtops - postscript filter for printing Japanese characters on Sun Laser Writer or Japanese postscript printer SYNOPSIS
jtops [-12rRjJvwWmg] [-ln] [-s size] [-f font] [filename...] AVAILABILITY
SUNWjfpu DESCRIPTION
jtops is a filter for converting Japanese characters to Japanese postscript output which uses Kanji font on a printer side. Input from stdin is converted and sent to stdout. If there is no filename, the standard input is read. By default, it forms font size 10 and 66 lines per page for the portrait form. Before checking options specified in command lines, it interprets the strings in the JTOPS environment variable as options. OPTIONS
-1 1 column output (by default). -2 2 columns output. -r Rotate for the landscape form. -R Output in the portrait form (by default). -v Use Kanji-fonts of printer (for the Japanese PostScript printer by default). -l n Specify the number of lines per page as n (by default 66). -m Use Ming style as Japanese fonts (by default). -g Use Gothic style as Japanese fonts. As alphabetic fonts use Courier-Bold style unless -f option is specified. -f font Specify alphabetic fonts in font. By default, use Courier style without -g option, otherwise Courier-Bold style. -s size Set font size to size. When the fontsize is specified with -s, the lines per page are calculated as follows: portrait: 720 / (fontsize + 1) landscape: 550 / (fontsize + 1) -j Use half size alphanumeric of Japanese fonts as alphanumeric fonts. -J Use Courier as alphanumeric fonts( by default). -W Control the ratio of alphanumeric character and Japanese to be 1:2, except changeable width of alphanumeric fonts( by default). -w Not control the ratio of alphanumeric character and Japanese. EXAMPLES
Example 1: example% jtops -j -l40 -s11 filename | lpr example% pr -l120 filename | jtops -l120 -s5 | lpr example% jtops -2r filename | lpr ENVIRONMENT VARIABLES
The locale has to be set to ja, ja_JP.eucJP, ja_JP.PCK, or ja_JP.UTF-8 in your environment. SEE ALSO
expand(1), lp(1), pr(1), lpr(1B), lpfilter(1M) NOTES
jtops supports the following character sets; o JIS X 0201 figure character set for Roman o JIS X 0201 figure character set for Katakana o JIS X 0208 SunOS 5.10 13 Sep 2002 jtops(1)
All times are GMT -4. The time now is 08:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy