Sponsored Content
Full Discussion: Row alignment
Top Forums Shell Programming and Scripting Row alignment Post 302914217 by yanglei_fage on Friday 22nd of August 2014 09:07:34 PM
Old 08-22-2014
if each line uses printf or echo to print, is there anyway to let them align?

Last edited by Scrutinizer; 08-23-2014 at 08:45 AM.. Reason: Spelling
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

2. UNIX for Dummies Questions & Answers

Shell Script: Traverse Database Table Row by Row

Hello Everyone, My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row. I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table. Please help. Thanks &... (5 Replies)
Discussion started by: ahsan.asghar
5 Replies

3. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

4. Shell Programming and Scripting

In php, Moving a new row to another table and deleting old row

Hi, I already succeed moving a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla). But it can't delete the old row. Please help me with the script. my php script: INSERT INTO... (2 Replies)
Discussion started by: jazzyzha
2 Replies

5. Emergency UNIX and Linux Support

[Solved] Mysql - Take data from row and copy it to another row

Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :( Dear community, I have a table with two rows like: Row1 Row2 ======= ======= 7,3 text 1 1,3 text 2 1,2,3 blabla What i need to do is add/copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies

6. Shell Programming and Scripting

Get row number from file1 and print that row of file2

Hi. How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg file1 1:abc 3:ghi 6:pqr file2 a abc b def c ghi d jkl e mno f pqr ... (6 Replies)
Discussion started by: Abhiraj Singh
6 Replies

7. Shell Programming and Scripting

Add Row from First Row (Split Row)

HI Guys, I have Below Input :- RepigA_hteis522 ReptCfiEtrBsCll_aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 RepigA ReptCfiEtrBsCll hteis522 aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies

8. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies

9. Shell Programming and Scripting

Splitting single row into multiple rows based on for every 10 digits of last field of the row

Hi ALL, We have requirement in a file, i have multiple rows. Example below: Input file rows 01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212 01,1,102319,0,1,80,20,U,1,241,00000059420000006021 I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies

10. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6). The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
Dancer::Plugin::FlashMessage(3pm)			User Contributed Perl Documentation			 Dancer::Plugin::FlashMessage(3pm)

NAME
Dancer::Plugin::FlashMessage - Dancer plugin to display temporary messages, so called "flash messages". VERSION
version 0.314 DESCRIPTION
This plugin helps you display temporary messages, so called "flash messages". It provides a "flash()" method to define the message. The plugin then takes care of attaching the content to the session, propagating it to the templating system, and then removing it from the session. However, it's up to you to have a place in your views or layout where the message will be displayed. But that's not too hard (see SYNOPSYS). Basically, the plugin gives you access to the 'flash' hash in your views. It can be used to display flash messages. By default, the plugin works using a decent configuration. However, you can change the behaviour of the plugin. See CONFIGURATION NAME
Dancer::Plugin::FlashMessage - A plugin to display "flash messages" : short temporary messages SYNOPSYS
Example with Template Toolkit In your configuration, make sure you have session configured. Of course you can use any session engine : session: "simple" In your index.tt view or in your layout : <% IF flash.error %> <div class=error> <% flash.error %> </div> <% END %> In your css : .error { background: #CEE5F5; padding: 0.5em; border: 1px solid #AACBE2; } In your Dancer App : package MyWebService; use Dancer; use Dancer::Plugin::FlashMessage; get '/hello' => sub { flash error => 'Error message'; template 'index'; }; METHODS
flash # sets the flash message for the warning key flash warning => 'some warning message'; # retrieves and removes the flash message for the warning key my $warning_message = flash 'warning'; This method can take 1 or 2 parameters. When called with two parameters, it sets the flash message for the given key. When called with one parameter, it returns the value of the flash message of the given key. The message is deleted from the flash hash in the session. In both cases, "flash" always returns the value; IN YOUR TEMPLATE
After having set a flash message using "flash" in your Dancer route, you can access the flash message from within your template. The plugin provides you with the "flash" hashref, that you can access in your template, for example like this : <div class=error> <% flash.error %> </div> When you use it in your template, the flash message is deleted. So next time, "flash.error" will not exist. CONFIGURATION
With no configuration whatsoever, the plugin will work fine, thus contributing to the keep it simple motto of Dancer. configuration default values These are the default values. See below for a description of the keys plugins: FlashMessage: token_name: flash session_hash_key: _flash configuration description token_name The name of the template token that will contain the hash of flash messages. Default : "flash" session_hash_key You probably don't need that, but this setting allows you to change the name of the session key used to store the hash of flash messages. It may be useful in the unlikely case where you have key name conflicts in your session. Default : "_flash" COPYRIGHT
This software is copyright (c) 2011 by Damien "dams" Krotkine <dams@cpan.org>. LICENCE
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. AUTHORS
This module has been written by Damien "dams" Krotkine <dams@cpan.org>. SEE ALSO
Dancer AUTHOR
Damien "dams" Krotkine COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Damien "dams" Krotkine. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-11-26 Dancer::Plugin::FlashMessage(3pm)
All times are GMT -4. The time now is 09:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy