Want a tcl script to compare a string in a file ignoring white spaces


 
Thread Tools Search this Thread
Contact Us Post Here to Contact Site Administrators and Moderators Want a tcl script to compare a string in a file ignoring white spaces
# 1  
Old 04-30-2012
Want a tcl script to compare a string in a file ignoring white spaces

Hi ,

I want a tcl script to search a string ignoring whitespaces in a .log file . It should correctly match . The string are as follows

"Output-Maps 1 1 0 0 0" 1

and
Active Intermediate-Maps 0 0 0 1 0" 2


It should correctly match. If i change the string to
"Output-Maps 1 0 0 0 0" 1

it shouldn't match.

Please provide me the script. It's urgent.

Thanks
Kulua
# 2  
Old 04-30-2012
No one is going to provide you with a script if you show no effort yourself.

And, please, this forum is for contacting moderators and admins.

Hello!
This User Gave Thanks to Scott For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing White spaces from a huge file

I am trying to remove whitespaces from a file containing sample data as: 457 <EOFD> Mar 1 2007 12:00:00:000AM <EOFD> Mar 31 2007 12:00:00:000AM <EOFD> system <EORD> 458 <EOFD> Mar 1 2007 12:00:00:000AM<EOFD>agf <EOFD> Apr 20 2007 9:10:56:036PM <EOFD> prodiws<EORD> . Basically these... (11 Replies)
Discussion started by: amvip
11 Replies

2. Shell Programming and Scripting

List and Delete Files which are older than 7 days, but have white spaces in file name

I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {} But the ls command is the working on the files which have white... (16 Replies)
Discussion started by: karumudi7
16 Replies

3. UNIX for Advanced & Expert Users

Tcl script for seaching a string ignoring white spaces

Hi , I want to search a string in a file ignoring white spaces in TCL. My string is as follows Ouput-Maps " 1 1 1 0 " 1i am doing following set a *1*1*1*0* " }1 abc.log}] but it is not working. What is the wrong with the tcl script Thanks Gouranga Video... (0 Replies)
Discussion started by: mybapa3000@gmai
0 Replies

4. Shell Programming and Scripting

AWK - Ignoring White Space with FS

I have an AWK script that uses multiple delimiters in the FS variable. FS="+" My awk script takes a file name such as this: 12345_smith_bubba_12345_20120215_4_0.pdf and parses it out based on the under score. Each parsed field then has some code for data validation etc. This script has... (12 Replies)
Discussion started by: reno4me
12 Replies

5. Shell Programming and Scripting

How to remove white spaces from the beginning an end of a string in unix?

Suppose, I have a variable var=" name is ". I want to remove the blank spaces from the begining and endonly, not from the entire string. So, that the variable/string looks like following var="name is". Please look after the issue. (3 Replies)
Discussion started by: mady135
3 Replies

6. Solaris

removing special characters, white spaces from a field in a file

what my code is doing, it is executing a sql file and the resullset of the query is getting stored in the text file in a fixed format. for that fixed format i have used the following code:: Code: awk -F":"... (2 Replies)
Discussion started by: priyanka3006
2 Replies

7. Shell Programming and Scripting

File Comparison command but ignoring while spaces

Hello All, I am writing a file comparison utility and using the cmp command to compare 2file. But I need command that will compare 2 files and if the files are identical expect for differences in white spaces, then it should ignore those spaces and consider the two files equal. Is there a way to... (7 Replies)
Discussion started by: Veenak15
7 Replies

8. UNIX for Dummies Questions & Answers

deleting white spaces in a file

Hello Guys, I am a newbie to unix. I am having a requirement. Please help me for finding a solution for this, I am having a file as mentioned below: $ cat shank ackca acackac akcajc akcjkcja akcj ckcklc I want to delete all the white spaces in this file, I tried... (2 Replies)
Discussion started by: mraghunandanan
2 Replies

9. UNIX for Dummies Questions & Answers

wc of characters in a file ignoring white space

Hi everyone, $ more abcdefg.ksh abcdef alpha beta gamma abcdef abcdef lmnop $ wc sachin1.ksh 5 7 132 abcdefg.ksh if you see it shows that file has got 240 characters. I actually want to count how many characters... (1 Reply)
Discussion started by: sachin.gangadha
1 Replies

10. Shell Programming and Scripting

Two or more white spaces in string

Hi, Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable? E.g. first=HAI second=HELLO third="$first $second" # appending strings with more than one white spaces echo $third this would print HAI HELLO Output appears... (2 Replies)
Discussion started by: harish_oty
2 Replies
Login or Register to Ask a Question