Sponsored Content
Full Discussion: Formatting Perl Output
Top Forums Shell Programming and Scripting Formatting Perl Output Post 302435602 by nurani on Wednesday 7th of July 2010 07:23:09 PM
Old 07-07-2010
Bug Formatting Perl Output

Hi,

I am getting the output from a PERL program but the output is all on different lines.

My code is
Code:
printf hOUT "%s\t%s\t%s\t%s\t%s\t%s",$M1_CTR, $M2_CTR, $M3_CTR, $M4_CTR, $M5_CTR, $M6_CTR;

Example:

My report (which I send via email) should look like this

Area 1 Area 2 Area 3 Area 4 Area 5 Area 6
30 299 7 66 53 12


But instead Iam getting
Area 1 Area 2 Area 3 Area 4 Area 5 Area 6

30
299
7
66
53
12

How do I format the output so they all appear on one line?

Any suggestions to fix this?

Also, Iam new to perl and I need to complete this by Thursday(7/8)

Thanks
nurani
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatting the output

Hi all, Have the following code(1) producing the results(2 & 3). Would like to know if there is a way to format the two reports created in a similar fashion. IE - The first is formatted nicely as a result of the echo "$xmpbdate $xavgs" >> $xmpbrpt However when I attempt to do the same on... (7 Replies)
Discussion started by: Cameron
7 Replies

2. Shell Programming and Scripting

Formatting output

Hi, I am new to shell scripting, I ahve written a shell script which would extract me data, but my problem is I want to add a column name to my output. Using grep and sed I am getting my data from the input file. Sample data name : eric name : tom name : sean My output using grep and sed... (3 Replies)
Discussion started by: illur81
3 Replies

3. Shell Programming and Scripting

formatting output

Hi need some advice.. #grep -i hostname test.csv (gives the below output) HOSTNAME,name,host_test,,,,,,,, Now I need to format the above output as below. HOSTNAME: name=host_test Any easy way of doing this using awk or sed or printf? (4 Replies)
Discussion started by: balaji_prk
4 Replies

4. Shell Programming and Scripting

formatting the output

Is it possible to convert the attached file to the format mentioned. Here for a particular job the table name and the corresponding instance name from one test run "X" is compared with the table name and the instance name from the second test run "Y" for output rows,affected rows,applied... (1 Reply)
Discussion started by: ragavhere
1 Replies

5. Shell Programming and Scripting

more help with formatting ls output...

Ok, for a fun project, my goal is to replicate the style of "catalog" on an old apple ] *A 002 SOMEAPPLESOFTFILE B 004 SOMEFILE T 006 SOMETEXT I 002 SOMEINTEGERFILE The first character is either " " or "*" depending on if the file is locked or not. Next is the filetype, so in... (1 Reply)
Discussion started by: patrick99e99
1 Replies

6. Shell Programming and Scripting

perl ssh2 output formatting

Hi Experts, I am using following format for Perl SSH2 commands. #!/usr/bin/perl -w use Net::SSH::Perl; use POSIX; use Sys::Hostname; use Term::ANSIColor qw(:constants); use strict; #my $host="10.128.0.214"; my @nodeip = ("10.128.0.214","10.128.0.215") ; my %node =... (7 Replies)
Discussion started by: mtomar
7 Replies

7. Shell Programming and Scripting

Formatting of output

Hi Experts, I have to create a report for certain audit and my output looks as follows I m trying to format my output to look like Any inputs would be highly appreciated Thanks Syed (5 Replies)
Discussion started by: maverick_here
5 Replies

8. Shell Programming and Scripting

Output Formatting

Hi Guys I need help removing some lines from output i am receiving from a shell script. Here is the output: http://i52.tinypic.com/10z0fut.png I am trying to remove the output that i have circled. . ${EDW}/extracts/bin/extracts_setup2.sh . ${EDW}/extracts/extracts.conf ... (7 Replies)
Discussion started by: mooey1232003
7 Replies

9. Shell Programming and Scripting

Formatting the output

Hi, I have a file which contents entries in this form. Only in /data4/temp abc.000001 Only in /data4/temp abc.000003 Only in /data4/temp abc.000012 Only in /data4/temp abc.000120 Only in /data4/temp abc.000133 Only in /data4/temp abc.001444 i want to read line by line and format... (2 Replies)
Discussion started by: arijitsaha
2 Replies

10. Shell Programming and Scripting

Formatting of output

Hi, I have some output in the format below: Col-A Col-B 8781 4319 8781 2332 8781 0269 5550 3282 5550 9465 5550 7607 7064 4456 . . I want to re-format the output so i will get something like this: 8781:4319,2332,0269 5550:3282,9465,7607 7064:4456 for... (6 Replies)
Discussion started by: james2009
6 Replies
BTPAND(8)						    BSD System Manager's Manual 						 BTPAND(8)

NAME
btpand -- Bluetooth PAN daemon SYNOPSIS
btpand [-i ifname] [-m mode] -a addr -d device {-s service | -S service [-p psm]} btpand [-c path] [-i ifname] [-l limit] [-m mode] [-p psm] -d device {-s service | -S service} DESCRIPTION
The btpand daemon handles Bluetooth Personal Area Networking services in the system. It can operate in client mode as a Personal Area Net- working User (PANU) or in server mode as Network Access Point (NAP), Group ad-hoc Network (GN) or PANU host. btpand connects to the system via a tap(4) virtual Ethernet device and forwards Ethernet packets to remote Bluetooth devices using the Bluetooth Network Encapsulation Pro- tocol (BNEP). The PANU client is the device that uses either the NAP or GN service, or can talk directly to a PANU host in a crossover cable fashion. A GN host forwards Ethernet packets to each of the connected PAN users as needed but does not provide access to any additional networks. The NAP service provides some of the features of an Ethernet bridge, with the NAP host forwarding Ethernet packets between each of the con- nected PAN users, and a different network media. Note, the only differences between NAP and GN services as implemented by btpand are in the SDP service record. The bridging of packets by the NAP must be configured separately with brconfig(8). The options are as follows: -a address In client mode, address of remote server. May be given as BDADDR or name, in which case btpand will attempt to resolve the address via the bt_gethostbyname(3) call. -c path In server mode, specify path to the sdpd(8) control socket. The default path is /var/run/sdp. -d device Restrict connections to the local device. May be given as BDADDR or name, in which case btpand will attempt to resolve the address via the bt_devaddr(3) call. btpand will set the tap(4) interface physical address to the BDADDR of the Bluetooth radio. -i ifname btpand uses the tap(4) driver to create a new network interface for use. Use this option to select a specific tap(4) device interface which must already be created. -l limit In server mode, limit the number of simultaneous connections. The default limit is 7 for NAP and GN servers, and 1 for a PANU server. -m mode Set L2CAP connection link mode. Supported modes are: auth require devices to be paired. encrypt auth, plus enable encryption. secure encryption, plus change of link key. -p psm Use an alternative L2CAP Protocol/Service Multiplexer (PSM) for server mode or client mode (when not using Service Discovery). The default PSM for BNEP is 15 (0x000f). -s service Name of service to provide or connect to, the following services are recognised: GN Group ad-hoc Network. NAP Network Access Point. PANU Personal Area Networking User. -S service As per -s except that btpand will not use SDP services for connection setup. When providing networking services, the Bluetooth PAN profile says that the 'Class of Device' property of the bluetooth controller SHALL include Networking capability (set bit 0x020000). See btconfig(8) for details. After btpand has set up the client or server connection and opened the tap(4) interface, it will create a pid file and detach. FILES
/dev/tap /etc/bluetooth/hosts /var/run/sdp /var/run/tapN.pid EXIT STATUS
The btpand utility exits 0 on success, and >0 if an error occurs. EXAMPLES
ifconfig tap1 create btpand -a host -d ubt0 -s NAP -m encrypt -i tap1 dhclient -q -o -w -nw tap1 Will create an encrypted connection to the NAP on host, and link that to the tap1 interface. btpand -d ubt0 -s GN -m auth Will create a Group Network requiring authentication to join and register the GN service with the local SDP server. SEE ALSO
bluetooth(3), bluetooth(4), bridge(4), tap(4), brconfig(8), btconfig(8), dhclient(8), dhcpd(8), ifconfig(8), sdpd(8) The "Personal Area Networking Profile" and "Bluetooth Network Encapsulation Protocol" specifications are available at http://www.bluetooth.com/ AUTHORS
Iain Hibbert BUGS
There is no way to supply alternative values for the SDP record. There is no way to set net type or multicast address filters. btpand does not do any address routing except to directly connected unicast addresses. All other packets are multicast. As btpand uses the BDADDR of the Bluetooth radio as the physical address of the tap, only one instance can be run per radio. btpand can only provide a single service. BSD
August 17, 2008 BSD
All times are GMT -4. The time now is 06:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy