Reading first column of file which start with space also
Hi All,
I am trying to read first column of my file using command
The content of my file is as follow
Here I am getting output as
I am not getting RWire21 in my output. Initially I thought it could be due to more space but if that is the case then R1 and RWire10 should also be not printed.
Please advise me where I can do changes in my command.
Thanks and Regards
---------- Post updated at 03:46 AM ---------- Previous update was at 03:44 AM ----------
Please consider space before R1 and both RWire. It is not showing in forum.
Moderator's Comments:
Use code tags please, see PM.
Last edited by zaxxon; 07-29-2013 at 06:04 AM..
Reason: code tags
I am trying to read in a 2 column data file into Perl Hash array index. Here is my code.
#!/usr/bin/perl -w
use strict;
use warnings;
my $file = "file_a";
my @line = ();
my $index = 0;
my %ind_file = ();
open(FILE, $file) or die($!);
while(<FILE>) {
chomp($_);
if ($_ eq '')
{
... (1 Reply)
Hi Everyone!
I have a problem in reading a specific column from .xls file using perl language and then manipulating on given criteria.
Detailed Description of the problem::
I have one .xls file, in which i have to populate two columns based on Period_date column which is in same file.
My... (1 Reply)
consider the small piece of code
while read line
do
echo $line
done < example
content of example file
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the output is like
sadasdasdasdsa erwerewrwr ergdgdfgf rgerg erwererwr
the... (4 Replies)
How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
Hi,
For my reuirement, I have to read a file from the 2nd line till the last line<EOF>.
Say,
I have a file as test.txt, which as a header record in the first line followed by records in rest of the lines.
for i in `cat test.txt`
{
echo $i
}
While doing the above loop, I have read... (5 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
I have a space delimited text file. I want to extract rows where the third column has 0 as a value and write those rows into a new space delimited text file. How do I go about doing that? Thanks! (2 Replies)
Hi,
I am not so familiar with bash scripting and would appreciate your help here.
I have a text file 'input.txt' like this:
2 3 4
5 6 7
8 9 10
I want to store each column in an array like this
a ={2 5 8}, b={3 6 9}, c={4 7 10}
so that i can access any element, e.g b=6 for the later use. (1 Reply)
Hi,
I want to read a live log file line by line and considering those line which start from time stamp;
Below code I am using, which read line but throws an exception when comparing line that does not contain error code
tail -F /logs/COMMON-ERROR.log | while read myline; do... (2 Replies)
Hi Folks,
I have the below csv file which is comma delimited , now from this file i need to read the value of the column der_id and then want to create a separate text file which will contain the value of the column der_id only please advise how to read the value of the column der_id and then... (3 Replies)
Discussion started by: punpun66
3 Replies
LEARN ABOUT DEBIAN
fiaif-update
FIAIF-UPDATE(8) Administration and Privileged Commands FIAIF-UPDATE(8)NAME
fiaif-update - tests for new version and updated reserved_networks file.
SYNOPSIS
fiaif-update [--silent] [--help] <update|check>
DESCRIPTION
Tests for new version and updated reserved_networks file.
--silent
If this flag is present, then no textual output will be given.
check Test if a new version of FIAIF is available.
update Retrieves the files reserved_networks from the FIAIF website, and compared the version with the currently installed version, as
pointed to by fiaif.conf. If the retrieved version is newer, the old version is silently replaced.
help Prints the synopsis.
EXIT CODE
If updating the exit code will be non-zero if no update was performed, else the exit code will be zero.
FILES
/etc/fiaif/fiaif.conf
The configuration file for FIAIF
/etc/fiaif/private_networks
A list of private networks as specified by RFC1918
/etc/fiaif/reserved_networks
A list of reserved networks as specified by IANA.
REPORTING BUGS
Report bugs to <fiaif@fiaif.net>.
AUTHOR
Anders Fugmann <anders(at)fugmann.net>
SEE ALSO fiaif(8), fiaif.conf(5)Linux Feb 2003 FIAIF-UPDATE(8)