01-08-2009
How to get the first column from the txt file using unix command?
Hi All,
I have the file like this (file name is : tem_text)
no Id name ccy
------- ---- ------------------- --------
7777 17 India Overseas Partners 500INR
I want to retreive the third colimn of from the above text file
if i use the basic awk command
cat tem_text | awk '{ print $3 }'
it will return only the
name
------
India
insetead of return the all details from the third column
name
---------------------
India Overseas Partners
Please advice me on this
Thanks
MPS
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
With the help of this forum, I have a script with the following output:
chr7 27104483 27105154
chr7 27106872 27110789
chr7 27111956 27112830
chr7 27114388 27125180
chr7 27126966 27131260
chr7 27135440 27137796
which was created by the following script:
awk '1 == NR || $NF >= 1000 {... (6 Replies)
Discussion started by: awknerd
6 Replies
2. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
3. Shell Programming and Scripting
Hi expersts,
in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log
I want list only .txt and .TXT files in one command...
how to ??
//purple (1 Reply)
Discussion started by: thepurple
1 Replies
4. AIX
Helle,
I want to create a .ksh script in order to realize the following :
I have a .txt file organized in a bloc of information, each bloc start with 000 as following:
000...
001...
003...
004...
000...
001...
003...
004...
.
.
My aim is to add a new... (6 Replies)
Discussion started by: zainab2006
6 Replies
5. UNIX for Dummies Questions & Answers
I have a file like this
1 chr1 3661579 3662579
2 chr1 4350395 4351395
3 chr1 4399322 4400322
4 chr1 4486494 4487494
5 chr1 4775807 4776807
6 chr1 4775807 4776807
7 chr1 4775807 4776807
8 chr1 4796973 4797973
9 chr1 4846774 4847774... (3 Replies)
Discussion started by: sunsnow86
3 Replies
6. UNIX for Dummies Questions & Answers
How do you sort a text file that is made up of a single column? (sorting done in alphabetical order)
Example input:
MAP1S
ISYNA1
STAT6
Example output:
ISYNA1
MAP1S
STAT6 (1 Reply)
Discussion started by: evelibertine
1 Replies
7. UNIX for Dummies Questions & Answers
How do you sort a text file that is made up of a single column? (sorting done in alphabetical order)
Example input:
MAP1S
ISYNA1
STAT6
Example output:
ISYNA1
MAP1S
STAT6
Double post (0 Replies)
Discussion started by: evelibertine
0 Replies
8. UNIX for Dummies Questions & Answers
I would like help adding a new column to a large txt file (~10MB) that contains the filename. I have searched other posts but have not found an adequate solution.
I need this extra column so I can concatenate >100 files and perform awk searches on this large file.
My current txt file look... (4 Replies)
Discussion started by: kellywilliams
4 Replies
9. UNIX for Dummies Questions & Answers
Dear all,
I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000)
thanks a lot!
Lin (2 Replies)
Discussion started by: forevertl
2 Replies
10. Shell Programming and Scripting
Hi Guys,
I have one Big txt file and i what to phrase specific part as below.
Input :-
Event
Event {
recordLength 160118,
recordType 411,
eventId 3102118,
INTERNAL_PER_RO_ME_TA {
EVVXX_TIMESTAMP_HOUR 16,
EVVXX_TIMESTAMP_MINUTE 15,
EVVXX_TIMESTAMP_SECOND 3,
... (6 Replies)
Discussion started by: pareshkp
6 Replies
LEARN ABOUT SUSE
finance::quote::indiamutual
Finance::Quote::IndiaMutual(3) User Contributed Perl Documentation Finance::Quote::IndiaMutual(3)
NAME
Finance::Quote::IndiaMutual - Obtain Indian mutual fund prices from amfiindia.com
SYNOPSIS
use Finance::Quote;
$q = Finance::Quote->new;
%stockinfo = $q->fetch("indiamutual", "amfiindia-code"); # Can
failover to other methods
%stockinfo = $q->fetch("amfiindia", "amfiindia-code"); # Use this
module only.
# NOTE: currently no failover methods exist for indiamutual
DESCRIPTION
This module obtains information about Indian Mutual Fund prices from the Association of Mutual Funds India website amfiindia.com. The
information source "indiamutual" can be used if the source of prices is irrelevant, and "amfiindia" if you specifically want to use
information downloaded from amfiindia.com.
AMFIINDIA-CODE
In India a mutual fund does not have a unique global symbol identifier.
This module uses an id that represents the mutual fund on an id used by amfiindia.com. You can the fund is from the AMFI web site
http://amfiindia.com/downloadnavopen.asp.
LABELS RETURNED
Information available from amfiindia may include the following labels:
method link source name currency nav rprice sprice. The link label will be a url location for the NAV list table for all funds.
NOTES
amfiindia.com provides a link to download a text file containing all the NAVs. This file is mirrored in a local file /tmp/amfinavlist.txt.
The local mirror serves only as a cache and can be safely removed.
Currently NAVs of Open-Ended funds are supported.
SEE ALSO
AMFI india website - http://amfiindia.com/
Finance::Quote
perl v5.12.1 2009-10-05 Finance::Quote::IndiaMutual(3)