01-20-2017
Thank you sir. This works.
Could you please explain the code for my understanding so, I can write similar code in future.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
2. Shell Programming and Scripting
Hi,
I have a fixed width file.
The way this file works is say for example there are 30 columns in it each with different sizes say 10,5,2, etc...
If data in a field is less than the field size the rest of it is loaded with spaces.
I would like an awk command to that would replace
I have... (8 Replies)
Discussion started by: pinnacle
8 Replies
3. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
4. Shell Programming and Scripting
Hi
cat test.txt
H|123|341|567|asfg
D|dfg|trtyy|errt
D|ert|frty|wer
Here I need to replace the third column value with 100 of the first record only and while printing I need to print the full file content also..I am expecting a result like this
H|123|100|567|asfg
D|dfg|trtyy|errt... (3 Replies)
Discussion started by: saj
3 Replies
5. Shell Programming and Scripting
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies
6. Shell Programming and Scripting
Hi All,
I already have a code which replaces column 14 of NPBR.XTR.tmp with column 8 of NPBR3G.XTR.final
awk -F'\|' 'FNR==NR{a= $2"^"$8;next;}a{split(a,b,"^");$8=b;$14=b;}1' OFS="|" ${SHTEMP}NPBR3G.XTR.final ${SHTEMP}NPBR.XTR.tmp > ${SHTEMP}NPBR.XTR.final
I also need to replace column 15... (2 Replies)
Discussion started by: nua7
2 Replies
7. Shell Programming and Scripting
Hi,
In a file we have the following data like as below
abcdef="cfg-1-15"
bmmdda-g-45-2
yhdiao"rtg-1-df-34"
I need a sed/awk command to replace the above string with empty.
Thx, (1 Reply)
Discussion started by: kirankumar
1 Replies
8. Shell Programming and Scripting
Hi Forum.
I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been successful.
Original Data:
4365 monte des source rue,, ,<TAB>trevost<TAB>QC
Desired Data:... (1 Reply)
Discussion started by: pchang
1 Replies
9. UNIX for Beginners Questions & Answers
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone,
I have many files like so:
file1.txt
file2.txt
file3.txt
Within each file I have many lines of random text separated by commas like so:
abcAAA,123,defAA,456777,ghiA,789
jklB,101,mnoBBB,11211,pqrB,13111
stuCC,415,vwxCCCC,161,yzaC,718
I am trying to use SED or AWK to... (4 Replies)
Discussion started by: D3U5X
4 Replies
LEARN ABOUT DEBIAN
html::formfu::element::simpletable
HTML::FormFu::Element::SimpleTable(3pm) User Contributed Perl Documentation HTML::FormFu::Element::SimpleTable(3pm)
NAME
HTML::FormFu::Element::SimpleTable - simple table element
SYNOPSIS
The following is yaml markup for a table consisting of a header row containing 2 "th" cells, and a further 2 rows, each containing 2 "td"
cells.
type: SimpleTable
headers:
- One
- Two
rows:
-
- type: Input
name: one_a
- type: Input
name: two_a
-
- type: Input
name: one_b
- type: Input
name: two_b
DESCRIPTION
Sometimes you just really need to use a table to display some fields in a grid format.
As its name suggests, this is a compromise between power and simplicity. If you want more control of the markup, you'll probably just have
to revert to using nested block's, setting the tags to table, tr, td, etc. and adding the cell contents as elements.
METHODS
headers
Input Value: @headers
"headers" accepts an arrayref of strings. Each string is xml-escaped and inserted into a new header cell.
rows
Input Value: @rows
"rows" accepts an array-ref, each item representing a new row. Each row should be comprised of an array-ref, each item representing a table
cell.
Each cell item should be appropriate for passing to "element" in HTML::FormFu; so either a single element's definition, or an array-ref of
element definitions.
odd_class
Input Value: $string
The supplied string will be used as the class-name for each odd-numbered row (not counting any header row).
even_class
Input Value: $string
The supplied string will be used as the class-name for each even-numbered row (not counting any header row).
SEE ALSO
Is a sub-class of, and inherits methods from HTML::FormFu::Element::Block, HTML::FormFu::Element
HTML::FormFu
AUTHOR
Carl Franks, "cfranks@cpan.org"
LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-23 HTML::FormFu::Element::SimpleTable(3pm)