Sponsored Content
Top Forums Shell Programming and Scripting Re align in one row using sed Post 302979705 by zaxxon on Thursday 18th of August 2016 02:14:56 AM
Old 08-18-2016
And another one:
Code:
$ sed '/^"/ {N; s/\n/,/}' test.csv
"url1","abc","project url1",2016-08-16
"url2,"microsoft","project url2",2016-08-18

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to update a single row in a file with sed

Hi. I want to be able to update only one line in a file that matches a key using sed, but I can't seem to get this (the key is right at the beginning of each row) Here is what I have tried so far, but every row is being updated. I want the end result to be that the input file only has the single... (6 Replies)
Discussion started by: brendanf
6 Replies

2. Shell Programming and Scripting

How to assign value to a variable with row(using -n) returned by sed

Hi Friends, REQUIREMENT: Want to delete files from the current directory match with the same in the file test.txt set -x i=1 echo "i=$i" COUNT=`sed -n '$=' test.txt` echo "Count=$COUNT" while do "## Here is error##" FILETOREMOVE=`sed -n \'$i,1p\' test.txt` echo $FILETOREMOVE... (5 Replies)
Discussion started by: sourabhsharma
5 Replies

3. Shell Programming and Scripting

sed command to delete row

I want to use sed command to delete a matched row with a pattern. And I also want to delete previous and next row of that row. Which option can I use with sed ? (9 Replies)
Discussion started by: anhtt
9 Replies

4. Shell Programming and Scripting

Add row, awk, sed ?

I wrote script in bash which generates this report: phrase1;phrase2;phrase3;phrase4;phrase5;phrase6;phrase7;phrase8 phrase9;phrase2;phrase10;phrase4;phrase11;phrase12;phrase13;phrase14 phrase15;phrase16;phrase17;phrase18;phrase19;phrase20;phrase21;phrase22 ... I would like add name only... (3 Replies)
Discussion started by: patrykxes
3 Replies

5. Shell Programming and Scripting

help with sed to add delimiter and new field to each row

I have a file with millions of rows that I need to add a delimiter and a new field with a zero to the end of each row. (its too big to open and do a find and replace regex) I'm looking for the next line '\n' and need to replace it with a Unit Separator (hex \037) 0 \n. I've tried the... (2 Replies)
Discussion started by: kmac
2 Replies

6. Shell Programming and Scripting

SED: delete matching row and 4 next rows?

Hi, Tried to look for solution, and found something similar but could not adapt the solution for my needs.. I'm trying to match a pattern (in this case "ProcessType")in a logfile, then delete that line and the 4 following lines. The logfile looks as follows: ProcessType: PROCESS_A... (5 Replies)
Discussion started by: Juha
5 Replies

7. Shell Programming and Scripting

Replace last row of a column in bash/awk/sed

Hi, I've got a file with 3 columns which ends like this: ... 1234 345 1400 5287 733 1400 8472 874 1400 9317 726 1400 I want to replace the last row of the last column with the value 0. So my new file will end: ... 1234 345 1400 5287 733 1400 8472 874 1400 9317 726 ... (5 Replies)
Discussion started by: jhunter87
5 Replies

8. Shell Programming and Scripting

awk/sed to get unique row

Hello ALL, I have very huge file almost 25G size contents of the file are "|" delimited columns on each row eg: 1396745|1078529|KDS|2011-04-21 00:00:00.0|1100|30|2|2011-04-20 22:35:24.0|2011-04-20 22:35:24.0|0|2011-04-21 00:00:00.0|1100|2222434|2011-04-21 11:00:00.0|0|0|2011-06-29... (10 Replies)
Discussion started by: posner
10 Replies

9. Shell Programming and Scripting

Insert row without deleting previous data using sed

Hello, I want to add a new row to a file to insert data without deleting the previous data there. Example: file a b c d Output a b newtext c (6 Replies)
Discussion started by: joseamck
6 Replies

10. Shell Programming and Scripting

sed not see last row

Hi Everyone! I have a problem my script. I'm useing sed to find the separate character in my text sed 's/"*"//g' ./myfile.txt My problem: When the last row is doesn't has enter in the end of line, the sed is not work. So if i have a 30 rows text i will see 29 rows separators. Please help... (9 Replies)
Discussion started by: snayper
9 Replies
Excel::Template::Container::Format(3pm) 		User Contributed Perl Documentation		   Excel::Template::Container::Format(3pm)

NAME
Excel::Template::Container::Format - Excel::Template::Container::Format PURPOSE
To format all children according to the parameters NODE NAME
FORMAT INHERITANCE
Excel::Template::Container ATTRIBUTES
Boolean attributes should be set to 1, 0, true, or false. Color values can be the color name or the color index. See "COLOURS IN EXCEL" in Spreadsheet::WriteExcel o align Set to either left, center, right, fill, or justify. Default is left. See also valign. o bg_color Set to a color value. Default is none. o bold This will set bold to on or off, depending on the boolean value. o border Set the border for all for edges of a cell. Also see bottom, top, left, and right. Valid values are 0 - 7. See "set_border()" in Spreadsheet::WriteExcel o border_color Sets the color value for the border. See also border, top_color, bottom_color, left_color and right_color. o bottom See border. o bottom_color See border_color o color This will set the color of the text, depending on color value. Default is black. o fg_color Set to a color value. This color will be used in foreground of some patterns. See color to change the color of text. Also see bg_color and pattern. o font This will sent the font face. Default is Arial. o font_outline This will set font_outline to on or off, depending on the boolean value. (q.v. OUTLINE tag) o font_shadow This will set font_shadow to on or off, depending on the boolean value. (q.v. SHADOW tag). This only applies to Excel for Macintosh. o font_strikeout This will set font_strikeout to on or off, depending on the boolean value. (q.v. STRIKEOUT tag) o hidden This will set whether the cell is hidden to on or off, depending on the boolean value. o indent Set the indentation level for a cell. Positive integers are allowed. o italic This will set italic to on or off, depending on the boolean value. (q.v. ITALIC tag) o left See border. o left_color See border_color. o num_format Set to the index of one of Excel's built-in number formats. See "set_num_format()" in Spreadsheet::WriteExcel o pattern Set to an integer, 0 - 18. Sets the background fill pattern of a ell. Default is 1, solid. o right See border. o right_color See border color. o rotation Set the rotation of the text in a cell. The rotation can be any angle in the range -90 to 90 degrees. The angle 270 is also supported. This indicates text where the letters run from top to bottom. o shrink A boolean value. If true, text will shrink to fit a cell. o size This will set the size of the font. Default is 10. Unless a row height is specifically set, the row will grow taller as necessary. o text_justlast A boolean value to justify the last line. Only applies to Far Eastern versions of Excel. o text_wrap A boolean value. When set to true, text will wrap in a cell instead of crossing over into empty cells. If the row height is not set, the row will grow taller to accommodate the wrapping text. o top See border. o top_color See border_color o valign Set to top, vcenter, bottom, or vjustify. Default is vcenter. See also align. CHILDREN
None EFFECTS
None DEPENDENCIES
None USAGE
<format bold="1"> ... Children here </format> In the above example, the children will be displayed (if they are displaying elements) in a bold format. All other formatting will remain the same and the "bold"-ness will end at the end tag. AUTHOR
Rob Kinyon (rob.kinyon@gmail.com) SEE ALSO
BOLD, HIDDEN, ITALIC, OUTLINE, SHADOW, STRIKEOUT perl v5.14.2 2012-04-29 Excel::Template::Container::Format(3pm)
All times are GMT -4. The time now is 10:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy