Sponsored Content
Full Discussion: tough parsing
Top Forums UNIX for Dummies Questions & Answers tough parsing Post 302321451 by ghostdog74 on Monday 1st of June 2009 08:07:37 AM
Old 06-01-2009
Code:
echo "Period= 20090531 Client Name= Clayton Lumbar Company Destination= MD" | awk '{
 gsub(/Period= |Client Name= |Destination= /,"|")
 m=split($0,a," ")
 print $0
}'

 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Seems the Shell Script is very tough

Guys plz respond. (1 Reply)
Discussion started by: prince_of_focus
1 Replies

2. Programming

Tough makefile question

At my company, we build some stuff using a makefile. While the makefile script is running, a developer may check in a newer version of a source file. The problem is, when we next run the make command, the target file isn't rebuilt, because the date of the target is after the dependency. Any... (1 Reply)
Discussion started by: mbbeaubi
1 Replies

3. UNIX for Advanced & Expert Users

Tough Substituion command

I have lines like: Mg2.qns W=0.175u Mg2.qpsb W=0.175u Mg4.qns W=0.175u Mg4.qpsb W=0.175u Which I need to become: Mg2.qns W=wmg2qns Mg2.qpsb W=wmg2qpsb Mg4.qns W=wmg4qns Mg4.qpsb W=wmg4qpsb To acheive this individually line by line I use a command like:... (3 Replies)
Discussion started by: ggggdddd
3 Replies

4. UNIX for Advanced & Expert Users

Tough Oracle Logic in Ux

How Can this logic be implemented in Unix SELECT B.SERVICE_TYPE || '|' || B.TOTAL_TYPE || '|' || B.CALL_INDICATOR || '|' || B.A_NUMBER || '|' || B.APN || '|' || B.DAY || '|' || B.HOUR ||... (3 Replies)
Discussion started by: magedfawzy
3 Replies

5. Shell Programming and Scripting

A very tough exercise

hello everyone!:) I have an exercise which I think is difficult for beginner like me. Here is the exercise Create a shell script, which takes a directory as command line argument. Script displays ten first lines from every text file in that directory. After displaying the lines from the... (1 Reply)
Discussion started by: googlevn
1 Replies

6. IP Networking

This looks like a tough routing issue

Hi, The default gateway (172.17.220.1) cannot be pinged via the default interface bond0 (172.17.220.231), but can be pinged via interface eth1 (10.201.135.73). # ping -I eth1 172.17.220.1 PING 172.17.220.1 (172.17.220.1) from 10.201.135.73 eth1: 56(84) bytes of data. 64 bytes from... (4 Replies)
Discussion started by: aixlover
4 Replies
flow-print(1)						      General Commands Manual						     flow-print(1)

NAME
flow-print -- Display flows in formatted ASCII. SYNOPSIS
flow-print [-hlnpw] [-d debug_level] [-f format] DESCRIPTION
The flow-print utility will display flow data in ASCII using pre-defined formats selectable with -f. Some of the less descriptive column headers are defined below Header Description ------------------------------- Sif Source Interface ifIndex. DiF Destination Interface ifIndex. Pr Protocol. P Protocol. SrcP Source Port. DstP Destination Port. Pkts Packets. Octets Octets (Bytes). Active Time in ms the flow was active. B/Pk Bytes per Packet. Ts Type of Service. Fl Flags, for TCP the cumulative or of the TCP control bits. srcAS Source AS. dstAS Destination AS. Start Start time of the flow. End End time of the flow. router_sc V7 IP address of router producing shorcuts. peer_nexthop V6 IP address of peer next hop IP address. encap i/o Version 6 only. Encapsulation size in/out duration Time in ms the flow was active. input Input Interface ifIndex. output Output Interface ifIndex. flows Number of aggregated flows. mTos V8.x ToS of pkts that exceeded the contract. xpackets V8.x Packets that exceed the contract. OPTIONS
-d debug_level Enable debugging. -f format Select format. The default is appropriate for the export type of the flow data. Available formats are: 0 1 line, interfaces, hex ports 1 2 line (includes timing and flags) 2 2 line candidate TCP syn attack flows 3 1 line, no interfaces, decimal ports 4 1 line with AS number 5 1 line, 132 column 6 show ip accounting emulation 7 1 line, 132 column +router_id 8 1 line, 132 column +encapsulation 9 1 line with tag values 10 AS aggregation 11 Protocol Port aggregation 12 Source Prefix aggregation 13 Destination Prefix aggregation 14 Prefix aggregation 15 Destination aggregation (Catalyst) 16 Source Destination aggregation (Catalyst) 17 Full Flow (Catalyst) 18 ToS AS Aggregation 19 ToS Proto Port aggregation 20 ToS Source Prefix aggregation 21 ToS Destination Prefix aggregation 22 ToS Prefix Aggregation 23 ToS Prefix Port aggregation 24 Full (Catalyst) -h Display help. -l Unbuffer output. -n Use symbolic names where appropriate. -p Display header information. -w Wide output. EXAMPLES
Display flows in flowfile flow-print < flowfile FILES
Configuration files: Symbols - /etc/flow-tools/sym/*. BUGS
None known. AUTHOR
Mark Fullmer maf@splintered.net SEE ALSO
flow-tools(1) flow-print(1)
All times are GMT -4. The time now is 09:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy