What is the diference between text files?

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting What is the diference between text files?
# 1  
Old 06-06-2011
What is the diference between text files?

Hello World! Smilie

I did one shell script to read one txt file containing one phone numbers list and perform one search of numbers into a couple of log files.

When I use the file called "qq.txt" the script works correctly but using file called "MSISDN_Deactivation_Pending_Todos.txt" numers aren't processed.

I opened both files using vi editor and executed ":set list" to check for hiden characters but I can not see any unmormal character.

Kindly some one should tell me what is the difference between both archives ("qq.txt" & "MSISDN_Deactivation_Pending_Todos.txt")?

Thank you in advance

# 2  
Old 06-06-2011
can you post your code ( lines where your process the files)
# 3  
Old 06-06-2011
Show us the script.
# 4  
Old 06-06-2011
Following the code:
rm -f salida.csv
echo "Subscriber, sbn_id" > salida.csv
while read line    
     VALOR1=$(echo "$line"|cut -f1)
     echo $VALOR1
     more *..log | grep "RBT_ACT_FREE|D|" | grep $VALOR1 | awk -F"|" '{print $4,",",$6}' | uniq >> salida.csv
   done < $1

Last edited by Franklin52; 06-07-2011 at 06:08 AM.. Reason: Please use code tags, thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read text between regexps and write into files based on a field in the text

Hi, I have a huge file that has data something like shown below: huge_file.txt start regexp Name=Name1 Title=Analyst Address=Address1 Department=Finance end regexp some text some text start regexp Name=Name2 Title=Controller Address=Address2 Department=Finance end regexp (7 Replies)
Discussion started by: r3d3
7 Replies

2. Shell Programming and Scripting

How to add a text at the beginning of a text files in a folder?

how to add a text ( surya) at the beginning of a text files (so many) in folder text file: 111111 555555 666666 result: surya 111111 555555 666666 (3 Replies)
Discussion started by: suryanarayana
3 Replies

3. Shell Programming and Scripting

Read n lines from a text files getting n from within the text file

I dont even have a sample script cause I dont know where to start from. My data lookes like this > sat#16 #data: 15 site:UNZA baseline: 205.9151 0.008 -165.2465 35.8109 40.6685 21.9148 121.1446 26.4629 -18.4976 33.8722 0.017 -165.2243 48.2201 40.6908 ... (8 Replies)
Discussion started by: malandisa
8 Replies

4. Shell Programming and Scripting

Split a text file into multiple text files?

I have a text file with entries like 1186 5556 90844 7873 7722 12 7890.6 78.52 6679 3455 9867 1127 5642 ..N so many records like this. I want to split this file into multiple files like cluster1.txt, cluster2.txt, cluster3.txt, ..... clusterN.txt. (4 Replies)
Discussion started by: sammy777
4 Replies

5. UNIX for Dummies Questions & Answers

Changing text in multiple files, but with different text for each file

Hello, I have a situation where I want to change a line of text in multiple files, but the problem is that I want to change the text to something unique for each file. For example, let's say I have five files named bob.txt, joe.txt, john.txt, tom.txt, and zach.txt. Each of these files has a... (5 Replies)
Discussion started by: Scatterbrain26
5 Replies

6. Shell Programming and Scripting

Script to create a text file whose content is the text of another files

Hello everyone, I work under Ubuntu 11.10 (c-shell) I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment. I will show you an example: - On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Discussion started by: tenteyu
1 Replies

7. Solaris

Solaris container date diference

Hi people, I dont have a real problem, its also a so strange issue. When i connect to my system from a ssh session or telnet normaly from putty and execute the command "date" its show me the correctly time in BRT format for root and all other users. But when i connect from the global... (3 Replies)
Discussion started by: anonymouzz
3 Replies

8. Shell Programming and Scripting

Find and add/replace text in text files

Hi. I would like to have experts help on below action. I have text files in which page nubmers exists in form like PAGE : 1 PAGE : 2 PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
Discussion started by: lodhi1978
6 Replies

9. UNIX for Dummies Questions & Answers

Diference of file in a line

I am going to arrange a data and excel can't do this functionality. If anyone here could help me do this i will really appreicate it. I have a file that contains thousands columns and it looks like this User1 SF SMB QH user2 SF SF User3 QH User4 SMB QH I need to extract the... (9 Replies)
Discussion started by: kharen11
9 Replies

10. UNIX for Dummies Questions & Answers

grep multiple text files in folder into 1 text file?

How do I use the grep command to take mutiple text files in a folder and make one huge text file out of them. I'm using Mac OS X and can not find a text tool that does it so I figured I'd resort to the BSD Unix CLI for a solution... there are 5,300 files that I want to write to one huge file so... (7 Replies)
Discussion started by: coppertone
7 Replies
Login or Register to Ask a Question