Sponsored Content
Full Discussion: Insert text space
Top Forums Shell Programming and Scripting Insert text space Post 302600464 by nicolethomson on Wednesday 22nd of February 2012 08:35:17 AM
Old 02-22-2012
thanks a ton,
along with it, i am going to try few more like creating workbook's.

Let me get back to you shortly.

you made life easier.

---------- Post updated at 08:34 AM ---------- Previous update was at 07:05 AM ----------

Code:
#!/usr/bin/perl -w

use strict;
use Spreadsheet::WriteExcel;

# Create a new Excel workbook
my $workbook = Spreadsheet::WriteExcel->new("districts.xls");

# Add some worksheets
my $zu = $workbook->addworksheet("zunheboto");
my $ba = $workbook->addworksheet("bangalore");
my $hy  = $workbook->addworksheet("hyderabad");
my $er  = $workbook->addworksheet("kurnool");

# Add a caption to each worksheet
#foreach my $worksheet (@{$workbook->{worksheets}}) {
#   $worksheet->write(0, 0, "Milege");
#}

# zunheboto.txt, bangalore.txt hyderabad.txt kurnool.txt are in this folder, wanted extract info from *.txt and based on filename it ahs to create the workbook and append the data based on the date. getting confused here

my $virudhungr = open ("|sed "s/^\([0-9]\)/Date              \1/; s/Bike speed (kmph)/Bike_speed_(kmph)/; s/Bike_speed_(kmph)/Bike speed (kmph)/" hyderabad.txt");

# Write some data
#echo $virudhungr;
$zu->write($virudhungr);
#$ba->write($hy);
#$hy->write ($ba);
#$er->write ($er);

# Set the active worksheet
#$er->activate();

---------- Post updated at 08:36 AM ---------- Previous update was at 08:34 AM ----------

this will be every five days once i will update. so thought of cron-jobing it.

---------- Post updated 2012-02-22 at 03:19 AM ---------- Previous update was 2012-02-21 at 08:36 AM ----------

not able to do it, how to proceed?

---------- Post updated at 05:49 AM ---------- Previous update was at 03:19 AM ----------

i am sorry franklin52, already one of the senior member warned me, but i missed it out, pls accept my apologies

---------- Post updated at 08:35 AM ---------- Previous update was at 05:49 AM ----------

will those codes work?

i am trying it but, doesnt have much luck, pls help

Last edited by Franklin52; 02-22-2012 at 05:46 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to insert some constant text at beginig of each line within a text file.

Dear Folks :), I am new to UNIX scripting and I do not know how can I insert some text in the first column of a UNIX text file at command promtp. I can do this in vi editor by using this command :g/^/s//BBB_ e,g I have a file named as Test.dat and it containins below text: michal... (4 Replies)
Discussion started by: Muhammad Afzal
4 Replies

2. Shell Programming and Scripting

Need to insert new text and change existing text in a file using SED

Hi all, I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output. sed '$a\ hi... ' shell > shell1 But I face problem when using the same in script. It is throwing the error as, sed: command garbled:... (4 Replies)
Discussion started by: iamgeethuj
4 Replies

3. Shell Programming and Scripting

Insert space between two words

Hi, I need to insert space between words on my output in UNIX other than the single space given by the space bar on my keyboard, e.g when are you going. (There should be 4 spaces between each of these words) rather than when are you going Can anyone help me with... (3 Replies)
Discussion started by: divroro12
3 Replies

4. Shell Programming and Scripting

Insert space between characters using sed

Input: Youcaneasilydothisbyhighlightingyourcode. Putting space after three characters. You can eas ily dot his byh igh lig hti ngy our cod e. How can i do this using sed? (10 Replies)
Discussion started by: cola
10 Replies

5. UNIX for Dummies Questions & Answers

insert white space between numbers

Hello all, I have a file with several lines like this: (1,1) (4,10) (8,23) (17, 4) (6,8) etc. and I need this: ( 1 , 1 ) ( 4 , 10 ) ( 8 , 23 ) ( 17 , 4 ) ( 6 , 8 ) How do I insert a space between the left parenthesis and the first number, between the first number and the comma,... (2 Replies)
Discussion started by: MDeBiasse
2 Replies

6. UNIX for Advanced & Expert Users

Insert 1 space using the command sed

Hi I want to use sed to insert one space after the 10'th character in every line. The lines are on this format: 2012-01-1012:30:55|7323456|65432 2011-02-0313:11:06|1223|3456 ...... ...... Does anyone know sed well enough to acomplish this? If there is any other way around this... (7 Replies)
Discussion started by: ic12
7 Replies

7. Shell Programming and Scripting

how to insert space in alphanumeric string

Hi everyone, I want help to insert space between digits and letters in a alphanumeric string. INPUT TRY234TER PHY1TYR EXPECTED OUTPUT TRY 234 TER PHY 1 TYR The lines always begin with the letters and the alphabets will be a three letter combination before and after the number. The... (2 Replies)
Discussion started by: kaav06
2 Replies

8. UNIX for Dummies Questions & Answers

Changing only the first space to a tab in a space delimited text file

Hi, I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies

9. Shell Programming and Scripting

How to insert a space and assign the value to another variable?

Hello, I need to insert a space between 2 strings. I used many techniques and all of them worked but when I assign the value to another variable then the inserted space vanishes, strange! Please advise. # dat=`date |awk '{print $2,$3}'` # echo $dat Nov 3 The above is perfectly fine. Now... (4 Replies)
Discussion started by: prvnrk
4 Replies

10. Shell Programming and Scripting

Insert space in a word using sed

Hi all, I have a file that looks like this- ----------------------------- . . ATOM 8 O2' U A 5 135.452 109.687 7.148 1.00 48.99 A16S ATOM 9 C1' U A 5 135.282 111.512 5.641 1.00 48.99 A16S ATOM 10 N1 U A 5 134.647 112.595 ... (2 Replies)
Discussion started by: asmi_g
2 Replies
Alien::wxWidgets(3)					User Contributed Perl Documentation				       Alien::wxWidgets(3)

NAME
Alien::wxWidgets - building, finding and using wxWidgets binaries SYNOPSIS
use Alien::wxWidgets <options>; my $version = Alien::wxWidgets->version; my $config = Alien::wxWidgets->config; my $compiler = Alien::wxWidgets->compiler; my $linker = Alien::wxWidgets->linker; my $include_path = Alien::wxWidgets->include_path; my $defines = Alien::wxWidgets->defines; my $cflags = Alien::wxWidgets->c_flags; my $linkflags = Alien::wxWidgets->link_flags; my $libraries = Alien::wxWidgets->libraries( qw(gl adv core base) ); my @libraries = Alien::wxWidgets->link_libraries( qw(gl adv core base) ); my @implib = Alien::wxWidgets->import_libraries( qw(gl adv core base) ); my @shrlib = Alien::wxWidgets->shared_libraries( qw(gl adv core base) ); my @keys = Alien::wxWidgets->library_keys; # 'gl', 'adv', ... my $library_path = Alien::wxWidgets->shared_library_path; my $key = Alien::wxWidgets->key; my $prefix = Alien::wxWidgets->prefix; DESCRIPTION
Please see Alien for the manifesto of the Alien namespace. In short "Alien::wxWidgets" can be used to detect and get configuration settings from an installed wxWidgets. METHODS
load/import use Alien::wxWidgets version => 2.004 | [ 2.004, 2.005 ], compiler_kind => 'gcc' | 'cl', # Windows only compiler_version => '3.3', # only GCC for now toolkit => 'gtk2', debug => 0 | 1, unicode => 0 | 1, mslu => 0 | 1, key => $key, ; Alien::wxWidgets->load( <same as the above> ); Using "Alien::wxWidgets" without parameters will load a default configuration (for most people this will be the only installed confiuration). Additional parameters allow to be more selective. If there is no matching configuration the method will "die()". In case no arguments are passed in the "use", "Alien::wxWidgets" will try to find a reasonable default configuration. Please note that when the version is pecified as "version =" 2.004> it means "any version >= 2.004" while when specified as "version =" [ 2.004, 2.005 ]> it means "any version => 2.004 and < 2.005". key my $key = Alien::wxWidgets key; Returns an unique key that can be used to reload the currently-loaded configuration. version my $version = Alien::wxWidgets->version; Returns the wxWidgets version for this "Alien::wxWidgets" installation in the form MAJOR + MINOR / 1_000 + RELEASE / 1_000_000 e.g. 2.006002 for wxWidgets 2.6.2 and 2.004 for wxWidgets 2.4.0. config my $config = Alien::wxWidgets->config; Returns some miscellaneous configuration informations for wxWidgets in the form { toolkit => 'msw' | 'gtk' | 'motif' | 'x11' | 'cocoa' | 'mac', debug => 1 | 0, unicode => 1 | 0, mslu => 1 | 0, } include_path my $include_path = Alien::wxWidgets->include_path; Returns the include paths to be used in a format suitable for the compiler (usually something like "-I/usr/local/include -I/opt/wx/include"). defines my $defines = Alien::wxWidgets->defines; Returns the compiler defines to be used in a format suitable for the compiler (usually something like "-D__WXDEBUG__ -DFOO=bar"). c_flags my $cflags = Alien::wxWidgets->c_flags; Returns additional compiler flags to be used. compiler my $compiler = Alien::wxWidgets->compiler; Returns the (C++) compiler used for compiling wxWidgets. linker my $linker = Alien::wxWidgets->linker; Returns a linker suitable for linking C++ binaries. link_flags my $linkflags = Alien::wxWidgets->link_flags; Returns additional link flags. libraries my $libraries = Alien::wxWidgets->libraries( qw(gl adv core base) ); Returns link flags for linking the libraries passed as arguments. This usually includes some search path specification in addition to the libraries themselves. The caller is responsible for the correct order of the libraries. link_libraries my @libraries = Alien::wxWidgets->link_libraries( qw(gl adv core base) ); Returns a list of linker flags that can be used to link the libraries passed as arguments. import_libraries my @implib = Alien::wxWidgets->import_libraries( qw(gl adv core base) ); Windows specific. Returns a list of import libraries corresponding to the libraries passed as arguments. shared_libraries my @shrlib = Alien::wxWidgets->shared_libraries( qw(gl adv core base) ); Returns a list of shared libraries corresponding to the libraries passed as arguments. library_keys my @keys = Alien::wxWidgets->library_keys; Returns a list of keys that can be passed to "shared_libraries", "import_libraries" and "link_libraries". library_path my $library_path = Alien::wxWidgets->shared_library_path; Windows specific. Returns the path at which the private copy of wxWidgets libraries has been installed. prefix my $prefix = Alien::wxWidgets->prefix; Returns the install prefix for wxWidgets. dump_configurations Alien::wxWidgets->dump_configurations( %filters ); Prints a list of available configurations (mainly useful for interactive use/debugging). show_configurations Alien::wxWidgets->show_configurations( %filters ); Prints a human-readable list of available configurations (mainly useful for interactive use/debugging). get_configurations my $configs = Alien::wxWidgets->get_configurations( %filters ); Returns a list of configurations matching the given filters. AUTHOR
Mattia Barbon <mbarbon@cpan.org> LICENSE
Alien::wxWidgets Copyright (c) 2005-2008 Mattia Barbon <mbarbon@cpan.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself inc/bin/patch was taken from the Perl Power Tools distributions Copyright (c) 1999 Moogle Stuffy Software <tgy@chocobo.org> You may play with this software in accordance with the Perl Artistic License. You may use this documentation under the auspices of the GNU General Public License. inc/bin/patch.exe was downloaded from http://gnuwin32.sourceforge.net/packages/patch.htm ad is copyrighted by its authors, sources are included inside the inc/src directory. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA bundled files from CPAN inc/File/Fetch/Item.pm inc/File/Fetch.pm inc/File/Spec/Unix.pm inc/IPC/Cmd.pm inc/Locale/Maketext/Simple.pm inc/Module/Load/Conditional.pm inc/Module/Load.pm inc/Params/Check.pm inc/Archive/Extract.pm Are copyright their respective authors an can be used according to the license specified in their CPAN distributions. perl v5.10.0 2009-05-18 Alien::wxWidgets(3)
All times are GMT -4. The time now is 01:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy