Sponsored Content
Top Forums Shell Programming and Scripting Loop is not reading tabs from the file Post 302606877 by Scrutinizer on Tuesday 13th of March 2012 04:04:29 AM
Old 03-13-2012
IFS= means set the Input Field Selector to nothing for the read statement, causing no field splitting and keeping leading and ending tabs intact.
-r means do not interpret the \ character.
 

10 More Discussions You Might Find Interesting

1. HP-UX

How to make a loop base on reading a file?

Need help on making a loop script base on what is inside a file... File to read: List.txt List.txt contains below w/c are file name as well: SAMPLEa SAMPLEb SAMPLEc SAMPLEd SAMPLEe SAMPLEf . . . Want to make a loop that will manipulate those that are inside the file.txt w/c are... (3 Replies)
Discussion started by: JohnBalayo
3 Replies

2. UNIX for Dummies Questions & Answers

How to make a loop base on reading a file?

To make it clearer: I have a file, List.txt List.txt contains: (these are actually splitted files w/c I got from ls command and dump them to the List.txt file) SAMPLEa SAMPLEb SAMPLEc SAMPLEd SAMPLEe SAMPLEf . . . . . And I want to rename these files to have a .dat extension.... (3 Replies)
Discussion started by: JohnBalayo
3 Replies

3. Shell Programming and Scripting

Not access variable outside loop when a reading a file

I am writing a shell script using the korn shell. It seems that I am only able to use local variables within a while loop that is reading a file. (I can't access a variable outside a previously used while loop.) It's been a while since I wrote shell scripts. Here is a sample cat file.txt... (4 Replies)
Discussion started by: ricardo.ludwig
4 Replies

4. Shell Programming and Scripting

How to get the modified value of variable outside the while loop reading from a file

Hi Friends , Sorry if this is a repeated question , The input file contains 5 lines , so the the values of the variables i and count should b i=5; count=15 but the variables are not updating , the value of variables showing i=0 and count =0 only.:mad: can any1 help me please. (11 Replies)
Discussion started by: babusek
11 Replies

5. AIX

How to pause a while loop while reading from a file

Hi, I am building a script to grep for a string in all the files from a folder and display the results. I am reading the files one by one by placing the names in other file using while loop my code is as below while read inp do chk=`grep -c "$str" $pth/$inp` ... (2 Replies)
Discussion started by: sekhar gajjala
2 Replies

6. Shell Programming and Scripting

While loop is not reading next line in the file when IF condition is used.

Hi Guys I am new to scripting.Please forgive for asking basic questions. I want to write a script to check whether the logs are getting updated in last 15 mins. cat server 192.168.1.6 192.168.1.7 cat list 192.168.1.7 /logs/logpath1 192.168.1.7 /logs/logpath2 192.168.1.6... (4 Replies)
Discussion started by: vdurai
4 Replies

7. Shell Programming and Scripting

reading the values from a file in C Shell for loop

Hi All, I need small help on for loop syntax in C shell. How can we read the values from a file (line by line) through C shell loop. For Ex: $Cat file1 data1 data2 data3 data4 $ I have to print those values in a variable and have to perform some steps... Can anyone help on... (2 Replies)
Discussion started by: raghu.iv85
2 Replies

8. Shell Programming and Scripting

Need help with perl script with a while loop reading file

Good morning, I appreciate any assistance that I can get from the monks out there. I am able to get this to work for me so that I can do a hostname lookup if I only specify one hostname in the script. What I want to do is have a file with hostnames and do lookups for each name in the file. Here is... (1 Reply)
Discussion started by: brianjb
1 Replies

9. Shell Programming and Scripting

Removing \r and \n during reading file through while loop

Hi, I am writing in a file through cat command. This file will contain the path of file along with filename. e.g. /home/user/folder1/folder2/filename.txt There might be very large number of this path in same file like say 140 when I try to run while command: while read -r file do //command... (8 Replies)
Discussion started by: Pulkit Lall
8 Replies

10. Shell Programming and Scripting

Sequential Reading from two file in a loop

Hello All, I have two files with me file1.txt and file2.txt file1.txt has: 333 222 111 file2.txt has ccc bbb aaa ccc is related to 333 only, bbb is related to 222 only and aaa is related to 111 only. I have to get the values from each of the file and pass them in the URL... (3 Replies)
Discussion started by: ankur328
3 Replies
Plucene::Document::Field(3pm)				User Contributed Perl Documentation			     Plucene::Document::Field(3pm)

NAME
Plucene::Document::Field - A field in a Plucene::Document SYNOPSIS
my $field = Plucene::Document::Field->Keyword($name, $string); my $field = Plucene::Document::Field->Text($name, $string); my $field = Plucene::Document::Field->UnIndexded($name, $string); my $field = Plucene::Document::Field->UnStored($name, $string); DESCRIPTION
Each Plucene::Document is made up of Plucene::Document::Field objects. Each of these fields can be stored, indexed or tokenised. FIELDS
name Returns the name of the field. string Returns the value of the field. is_stored Returns true if the field is or will be stored, or false if it was created with "UnStored". is_indexed Returns true if the field is or will be indexed, or false if it was created with "UnIndexed". is_tokenized Returns true if the field is or will be tokenized, or false if it was created with "UnIndexed" or "Keyword". METHODS
Keyword my $field = Plucene::Document::Field->Keyword($name, $string); This will make a new Plucene::Document::Field object that is stored and indexed, but not tokenised. UnIndexed my $field = Plucene::Document::Field->UnIndexded($name, $string); This will make a new Plucene::Document::Field object that is stored, but not indexed or tokenised. Text my $field = Plucene::Document::Field->Text($name, $string); This will make a new Plucene::Document::Field object that is stored, indexed and tokenised. UnStored my $field = Plucene::Document::Field->UnStored($name, $string); This will make a new Plucene::Document::Field object that isn't stored, but is indexed and tokenised. perl v5.12.4 2011-08-14 Plucene::Document::Field(3pm)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy