Sponsored Content
Top Forums Shell Programming and Scripting File Processing in shell script Post 302417282 by telangmadhuri on Thursday 29th of April 2010 04:59:32 AM
Old 04-29-2010
File Processing in shell script

i have a file with following type of data
Code:
abcd :  gggggg
gggggg ; 1234
gggggg ; 5678
gggggg ; 3434
gggggg ; 6565
gggggg ; 1231
 
1234 ; vvvv ;Eng=Myfirstname 
5678 ; xyzf  ;Eng=Mysecondname 
3434 ; xyzf  ;Eng=Mythirdname 
6565 ; xyzf  ;Eng=Mysfourthname 
1231 ; xyzf  ;Eng=Mysfifthname

now i want to create another file which will read the above file and have the above data in following format

Code:
gggggg 1234 Myfirstname
gggggg 5678 Mysecondname 
gggggg 3434 Mythirdname 
gggggg 6565 Mysfourthname
gggggg 1231 Mysfifthname

any help with the code is highly appreciated
Thanks

Last edited by zaxxon; 04-29-2010 at 06:11 AM.. Reason: use code tags please, ty
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Have a shell script check for a file to exist before processing another file

I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Discussion started by: heprox
3 Replies

2. Shell Programming and Scripting

Shell script not processing if statement properly

Hi I am trying to create a shell script that will look for a contracthead file first and if the contract head file does not exist on day1 exit script. Now on day2 if contracthead exists or not run the script uploading files in order such as contract line then contract contact so the... (2 Replies)
Discussion started by: jonathan184
2 Replies

3. Shell Programming and Scripting

Processing a file in shell

I have a file which is having enrties like entry-id 1 ABC : value DEF :value GHI :VALUE entry-id 2 ABC : value DEF :value GHI :VALUE entry-id 2 ABC : value DEF :value GHI :VALUE and so on .. .wht i want to do is (1 Reply)
Discussion started by: msbinu
1 Replies

4. Shell Programming and Scripting

Shell Script syntax for XML processing

Hi All, I am new to Shell scripting. I have a log file containing XML Messages.Each XML Message is accompanied with a timestamp.I need to count the the number of messages that get logged in a particular timeinterval.Is there any command/Syntax to achieve this. Any code/example is... (5 Replies)
Discussion started by: vignesh53
5 Replies

5. Shell Programming and Scripting

2 file processing script in C shell

I want to use an awk for the following scenario but not sure if it will work or not. I have two input file: F1 and F2 F1 02 05 08 F2 00 01 02 03 04 05 06 07 08 09 10 (1 Reply)
Discussion started by: jclanc8
1 Replies

6. Shell Programming and Scripting

Help with shell script for url processing

Hi, My objective is to make a shell script that, when run, you can input multiple links at once. text is then inserted between the http:// part and the following url. example : http://google.be ==> http://sometext.google.be it would be great if it could then open all the created links (wich... (5 Replies)
Discussion started by: tooster
5 Replies

7. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

8. Shell Programming and Scripting

Shell script for .Txt to .csv conversion with data processing

Hi experts, I want to convert a txt file having rows and columns (CNAI_DUMP_raw.txt) by comparing it with another text file (paramaters.txt) and generate a output in CSV which contains only 3rd column from CNAI_DUMP_raw.txt, and the columns mentioned in parameters.txt. FYI: There are two... (16 Replies)
Discussion started by: Gautam Banerjee
16 Replies

9. Shell Programming and Scripting

How to log file processing details to database table usnig UNIX shell script?

we are getting files on daily basis.we need to process these files. i need a unix shell script where we can count 1-The no of files processed 2-No of data/record processed for each files. The script should log these details into a database table. If there is any error while file... (3 Replies)
Discussion started by: Atul kumar
3 Replies
Cgroup classifier in tc(8)					       Linux						Cgroup classifier in tc(8)

NAME
cgroup - control group based traffic control filter SYNOPSIS
tc filter ... cgroup [ match EMATCH_TREE ] [ action ACTION_SPEC ] DESCRIPTION
This filter serves as a hint to tc that the assigned class ID of the net_cls control group the process the packet originates from belongs to should be used for classification. Obviously, it is useful for locally generated packets only. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. match EMATCH_TREE Match packets using the extended match infrastructure. See tc-ematch(8) for a detailed description of the allowed syntax in EMATCH_TREE. EXAMPLES
In order to use this filter, a net_cls control group has to be created first and class as well as process ID(s) assigned to it. The follow- ing creates a net_cls cgroup named "foobar": modprobe cls_cgroup mkdir /sys/fs/cgroup/net_cls mount -t cgroup -onet_cls net_cls /sys/fs/cgroup/net_cls mkdir /sys/fs/cgroup/net_cls/foobar To assign a class ID to the created cgroup, a file named net_cls.classid has to be created which contains the class ID to be assigned as a hexadecimal, 64bit wide number. The upper 32bits are reserved for the major handle, the remaining hold the minor. So a class ID of e.g. ff:be has to be written like so: 0xff00be (leading zeroes may be omitted). To continue the above example, the following assigns class ID 1:2 to foobar cgroup: echo 0x10002 > /sys/fs/cgroup/net_cls/foobar/net_cls.classid Finally some PIDs can be assigned to the given cgroup: echo 1234 > /sys/fs/cgroup/net_cls/foobar/tasks echo 5678 > /sys/fs/cgroup/net_cls/foobar/tasks Now by simply attaching a cgroup filter to a qdisc makes packets from PIDs 1234 and 5678 be pushed into class 1:2. SEE ALSO
tc(8), tc-ematch(8), the file Documentation/cgroups/net_cls.txt of the Linux kernel tree iproute2 21 Oct 2015 Cgroup classifier in tc(8)
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy