Sponsored Content
Top Forums Shell Programming and Scripting Scripting Help needed with a text file. Post 302678387 by tech_frk on Friday 27th of July 2012 06:36:34 PM
Old 07-27-2012
Scripting Help needed with a text file.

Hi,
Iam a novice to unix shell scripting, need a help from you guys.The scenario is as follows, i have the following Text file.
Code:
order No    Company    Category
21    aaa    A
24    aaa    A
87    aaa    B
98    aaa    B
23    abc    A
45    abc    B
25    bbb    A
76    wes    A
66    wes    B
44    wes    B
35    wes    B
39    wes    B
90    esd    B
99    esd    B
109    esd    B
26    esd    B
58    esd    A
76    tre    B
75    tre    B

Desired Output is as follows(columns Count, A, B are the no of times they are repeated):

HTML Code:
Company    Count    A    B
aaa    4    2    2
abc    2    1    1
bbb    1    1    0
wes    5    1    4
esd    5    4    1
tre    2    0    2
The output should be in a different file. Appreciate your help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Urgent help needed to delete some text without opening the file in unix

Hi To delete some text in 2 files in line1 ( not complete line) in unix without opening the files. For example: source file is like this <?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies

2. Shell Programming and Scripting

Help needed in extracting text present between two headers in .txt file

Hi All, Please help me out in fllowing problem. I have text file which contains the data in following format. Contents of file.txt are setregid02 Test that setregid() fails and sets the proper errno values when a non-root user attemps to change the real or effective... (2 Replies)
Discussion started by: varshit
2 Replies

3. Shell Programming and Scripting

Scripting change of text in another file

Hello, I am pretty new to UNIX/bash scripting, so this question may seem obvious. My experience is simply stringing commands together in a script, maybe doing some if/then testing and such, so I haven't gotten into anything too heavy... I have a shell script that I use as a template to create... (7 Replies)
Discussion started by: vwgtiturbo
7 Replies

4. Shell Programming and Scripting

search needed part in text file (awk?)

Hello! I have text file: From aaa@bbb Fri Jun 1 10:04:29 2010 --____OSPHWOJQGRPHNTTXKYGR____ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline My code '234565'. ... (2 Replies)
Discussion started by: candyme
2 Replies

5. Shell Programming and Scripting

shell or perl script needed for ldif file to text file conversion

This is the ldf file dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com objectClass: sdcsSubscriber objectClass: top postalCode: 29600 sdcsServiceLevel: 10 sdcsCustomerType: 14 givenName: Adelia sdcsBlackListAll: FALSE sdcsOwnerType: T-Mobile sn: Actionteam... (1 Reply)
Discussion started by: LinuxFriend
1 Replies

6. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

7. Shell Programming and Scripting

Needed shell script to append desired text to each line in a file

Hi, I had generated a report in my tool as followsoutput.txt 43.35 9 i needed the script to generate a new file like below i want to append the text to each of these lines of my filenewoutputfile.txt should be Total Amount : 43.35 Record Count:9 Regards, Vasa Saikumar. ... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies

8. Shell Programming and Scripting

Help needed editing text file using the terminal

Hi, I have text file with the header like this tracking_id condition replicate FPKM XLOC_000001 alpha 1 10.3199 XLOC_000001 alpha 0 10.3686 XLOC_000001 alpha 2 15.5619 ... With the first column being genes, the second being the condition, the third... (5 Replies)
Discussion started by: 4galaxy7
5 Replies

9. Shell Programming and Scripting

FTP a file using Shell Scripting (Help needed)

the requirements is to have a linux script which connects to a windows machine using ftp command and check for a flag file if found copy a .csv file into current machine. (3 Replies)
Discussion started by: tradingspecial
3 Replies

10. Shell Programming and Scripting

Read csv file, convert the data and make one text file in UNIX shell scripting

I have input data looks like this which is a part of a csv file 7,1265,76548,"0102:04" 8,1266,76545,"0112:04" I need to make the output data should look like this and the output data will be part of text file: 7|1265000 |7654899 |A| 8|12660000 |76545999 |B| The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
esd-config(1)							   User Commands						     esd-config(1)

NAME
esd-config - helper script for building with the Enlightened Sound Daemon (esd) SYNOPSIS
esd-config [--version] [--prefix=dir] [--cflags] [--libs] [--exec-prefix=dir] DESCRIPTION
The esd-config tool enables you to specify which compiler and linker flags should be used to compile and link programs that use the esd library. OPTIONS
The following options are supported: --cflags Print the compiler flags that are necessary to compile a program using the specified library. --libs Print the linker flags that are necessary to link with the specified library. --exec-prefix=diIf specified, use dir instead of the installation exec prefix that the library was built with, when computing the output for the --cflags and --libs options. This option must be specified before any --libs or --cflags options. --prefix=dir If specified, use dir instead of the installation prefix that the library was built with, when computing the output for the --cflags and --libs options. This option must be specified before any --libs or --cflags options. This option is also used for the exec prefix, if the --exec-prefix option is not specified. --version Print the currently installed version of the library on the standard output. EXAMPLES
Example 1: Getting the Enlightened Sound Daemon version example% esd-config --version Example 2: Determining the libraries required to link with the Enlightened Sound Daemon example% esd-config --libs EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/esd-config Executable for Enlightened Sound Daemon helper script ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-audio-devel | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
pkg-config(1), esdcat(1), esdplay(1), esdrec(1), esdsample(1), esdmon(1), esdctl(1), libesd(3) NOTES
This man page was originally written by Chris Waters (xtifr@debian.org) for Debian GNU/Linux. Rewritten by Brian Cameron, Sun Microsystems, using information from the orbit2-config(1) man page, by Dick Porter (dick@acm.org) and Elliot Lee (sopwith@redhat.com) SunOS 5.10 7 Jan 2003 esd-config(1)
All times are GMT -4. The time now is 03:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy