to find alphanumeric character


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers to find alphanumeric character
# 1  
Old 02-18-2011
Question to find alphanumeric character

Hi All,

I am having a data file which consists of lakhs of records in the below foramt:
Code:
"1223323","4341341","discription aadfad"
"3123123","5463456","discription aadfad"
"2343324","6565767","discription asdfads"
"A3423423","7957456","discription aadfad"
"343453B","7957456","discription aadfad"
"34C23423","7957456","discription aadfad"

how do i find the alphanumeric characters which are present in 1st column and/or 2nd column in the data file in unix..? Smilie
ENV: sunos, bash shell

Last edited by Franklin52; 02-18-2011 at 06:04 AM.. Reason: Please use code tags, thank you
# 2  
Old 02-18-2011
Try:
Code:
awk -F, '$1 ~ "[a-zA-Z]" || $2 ~ "[a-zA-Z]"' file

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find invalid character

HI Team, I have script to find the invalid character in file. f=’pallvi\mahajan’ n=0 while (( $n <= ${#f} )); do c="${f:$n:1}" echo '$c' if *] ]]; then grep -sq $c valid.txt if ; then echo "$f" >> f.txt break fi fi (18 Replies)
Discussion started by: pallvi_mahajan
18 Replies

2. Shell Programming and Scripting

Find last occurrence of a character in a string

Hello how to find last occurence of a string for example in the following I want last occurence of '-' i.e. position 12 str="aa-bbb-cccc-ddd-ee" my pupose is to get the string 'ee' Thanks and Regards Chetanz (5 Replies)
Discussion started by: Chetanz
5 Replies

3. Shell Programming and Scripting

Find character and Replace character for given position

Hi, i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command. thanks in advance, Sara (9 Replies)
Discussion started by: Sara183
9 Replies

4. Shell Programming and Scripting

Searching Alphanumeric Character From a File

Hi, In a error log file, the error code of a particular error contains both Alphabet and Numbers. My problem statement is to find the error codes from a particular log. That means, I need to search a word, which contains both alphabet and number. Please help me. Below is two examples of error... (1 Reply)
Discussion started by: snehasish_jana
1 Replies

5. UNIX for Dummies Questions & Answers

Find certain number of character in vi

Hello, Experts, I have a file with the first and second column connected together, and i want to use vi to seperate them (put a space in between). Is there any command in vi would put a space after the 7th letter? Thanks! example: 0.981101.517 2.944101.517 4.907101.517 (10 Replies)
Discussion started by: wingsy1212
10 Replies

6. Shell Programming and Scripting

find 3 character long text

I was trying to do some experiment with "sed". I want to find the filenames which are three characters. So, this is what I have done to search for it, using sed. sed -n -e '/^\{3\}$/p' test This returns the correct output for characters. But if I make change, let's say i create 2 more... (4 Replies)
Discussion started by: aksijain
4 Replies

7. Shell Programming and Scripting

Find and replace a character

Hi Team, i have 1st cloumn of data containing, LAMSBA01-BA-COFF-YTD LAMSBA01-BA-COFF-ITD LAMSBA01-BA-AGGR-IND . LAMSBA01-BA-CURR-COFF-BAL i need to replace the "-" to "_" (underscore) using AWK . please help me on this. Thanks, Baski (4 Replies)
Discussion started by: baskivs
4 Replies

8. Shell Programming and Scripting

Find ^M Character

Hi Experts, Is there a way to find whether a file contains ^M character in it?. It's quite obvious to vi, but can this be accomplished using an automated way to find recursively in a directory. probably i guess the best way would be to 1) Read the file and check if the end of line is ^M... (8 Replies)
Discussion started by: ganga.dharan
8 Replies

9. Shell Programming and Scripting

To find a character immediately following a specified String

Hello, I have a UNIX file in which data is like this -- ISA*00* *00* *01*006415160 *01*137361242 ... (3 Replies)
Discussion started by: The Observer
3 Replies

10. UNIX for Dummies Questions & Answers

Find files which contain a null character

Hi, I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement. Could anyone help please? Thanks! Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies
Login or Register to Ask a Question