Sponsored Content
Top Forums Shell Programming and Scripting Reading first column of file which start with space also Post 302838171 by zaxxon on Monday 29th of July 2013 05:08:24 AM
Old 07-29-2013
Getting same result using which code?
If you use Pamu's code you should get something like:
Code:
$ cat infile
          R1    pin23I    pin27I
R2    pin23G    pin27G
R3    pin27F    pin27D
    RWire10    pin15Y    pin23J
VCC1    pin27W    pin13Y
                                      RWire21    pin28W    pin27B
$ awk '{print $1}' infile
R1
R2
R3
RWire10
VCC1
RWire21

This User Gave Thanks to zaxxon For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PERL: reading 2 column data into Hash file

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)
Discussion started by: subhap
1 Replies

2. Shell Programming and Scripting

Reading a column from xls file using perl

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)
Discussion started by: kvth
1 Replies

3. Shell Programming and Scripting

How to avoid the truncating of multiple spaces into a single space while reading a line from a file?

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)
Discussion started by: Kesavan
4 Replies

4. UNIX for Dummies Questions & Answers

How do you delete cells from a space delimited text file given row and column number?

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)
Discussion started by: evelibertine
5 Replies

5. Shell Programming and Scripting

How to start reading from the nth line till the last line of a file.

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)
Discussion started by: machomaddy
5 Replies

6. UNIX for Dummies Questions & Answers

Adding tags to a specific column of a space delimited text file

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)
Discussion started by: evelibertine
1 Replies

7. UNIX for Dummies Questions & Answers

Extracting rows from a space delimited text file based on the values of a column

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)
Discussion started by: evelibertine
2 Replies

8. Shell Programming and Scripting

Reading columns from a text file and to make an array for each column

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)
Discussion started by: Asif Siddique
1 Replies

9. Shell Programming and Scripting

Reading line by line from live log file using while loop and considering only those lines start from

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)
Discussion started by: ketanraut
2 Replies

10. Shell Programming and Scripting

Reading the value of particular column from csv file

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
GIFTI_TEST(1)							   User Commands						     GIFTI_TEST(1)

NAME
gifti_test - test reading/writing a GIFTI dataset SYNOPSIS
gifti_test [...] OPTIONS
-help Show usage help. -gifti_hist Show giftilib history. -gifti_ver Show giftilib version. -encoding TYPE Set the data encoding for any output file. TYPE = ASCII : ASCII encoding TYPE = BASE64 : base64 binary TYPE = BASE64GZIP : base64 compressed binary -gfile OUTPUT Write out dataset as gifti image. -infile INPUT Specify INPUT as the GIFTI dataset to read. -no_data Do not write out data. -show Show final gifti image. -slist LEN s0... Restrict output to list of length LEN. -verb VERB Set verbose level. EXAMPLES
1. read in a GIFTI dataset (verbose, show output?) gifti_test -infile dset.gii gifti_test -infile dset.gii -verb 3 gifti_test -infile dset.gii -show 2. copy a GIFTI dataset (check differences?) gifti_test -infile dset.gii -gfile copy.gii diff dset.gii copy.gii 3. copy a GIFTI data, but write out only 3 surf indices: 0,4,5 gifti_test -infile time_series.gii -gfile ts3.gii -slist 3 0 4 5 SEE ALSO
Website: http://www.nitrc.org/projects/gifti AUTHOR
Richard Reynolds - SSCC, DIRP, NIMH, National Institutes of Health This manual page was written by Michael Hanke <michael.hanke@gmail.com>, for the Debian project (but may be used by others). gifti_test June 2010 GIFTI_TEST(1)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy