Sponsored Content
Full Discussion: Word wrap with sed
Top Forums Shell Programming and Scripting Word wrap with sed Post 302373054 by aigles on Thursday 19th of November 2009 09:43:15 AM
Old 11-19-2009
Try the following awk command :
Code:
awk '{gsub(/..:/, "\n&"); print}' inputfile

Jean-Pierre.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

word wrap in vi

I am using vi to edit shell scripts, but whenever I get to the end of the line it goes to the next line, and when I run the script it considers whatever was placed onthe next line a new command...I guess this has to do with word wrap- how do I continue to write on one line? (3 Replies)
Discussion started by: dangral
3 Replies

2. Shell Programming and Scripting

Should I use sed/ grep/awk for wrap file?

Hi, This is my first time post a new thread. I have been trying to work on this for the past 2 days and could not find any good solution. I have 1 long long line ( EDI wrapped file) like below: NEW*SR*04411763447*279*278*Q~*ZR*AAV*SR*04511763460*SQ*21B37F04~HL*305*304*Q~K~SN1*1*1*SR*05511763461*... (6 Replies)
Discussion started by: vanda_25
6 Replies

3. HP-UX

word wrap issue with grep

in my HP-Unix environment I continue to have issues seeing the whole file path when I do a grep Example: >ps -ef |grep test > /testpath/is/here/ should see: >ps -ef |grep test > /testpath/is/here/not/here/test Is there a setting to turn word wrap on/off? It works fine in our AIX... (4 Replies)
Discussion started by: bowtiextreme
4 Replies

4. UNIX for Dummies Questions & Answers

How to print line starts with specific word and contains specific word using sed?

Hi, I have gone through may posts and dint find exact solution for my requirement. I have file which consists below data and same file have lot of other data. <MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'> <MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
11 Replies

5. UNIX for Dummies Questions & Answers

line wrap in sed

I tried line wrap in sed by sed -l 20 ' n' and as far as i understand each long line would be split into lenght of 20 characters in each. but thats not happening.wats going wrong:confused: (5 Replies)
Discussion started by: mithun1!
5 Replies

6. UNIX for Dummies Questions & Answers

Word Wrap

When I cat a file that has several hundred characters in a line, the right hand side is truncated. How can I make everything displayed on my screen word wrap? (6 Replies)
Discussion started by: bsimon
6 Replies

7. UNIX for Dummies Questions & Answers

word wrap does not work

I have an input file like this, 79 #--------------------------------------------------------------------------- 80 #- define generic contact 81 cat > ${NAGIOS_ETC}/contact-generic.cfg <<-'EOF' 82 define contact { 83 name ... (4 Replies)
Discussion started by: ramky79
4 Replies

8. Shell Programming and Scripting

Replacing a particular word with another word in all the xml's under a particular directory with sed

Hi Folks, Could you please advise what will be the SED command to replace a word in all xml's under a particular directory for example let say I rite now at the following below location $ cd /ter/rap/config now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
1 Replies

9. UNIX for Dummies Questions & Answers

Word Wrap .CSV Fils

Is there a generic method for applying word wrap to all cells for a .csv file? (6 Replies)
Discussion started by: jimmyf
6 Replies

10. Shell Programming and Scripting

Uuencode a html file with word wrap

Hi, I have a file myfile.txt as seen below. Name Age Days --------- ------- -------- ABC 5 23 DEF 20 120 When i cat this file into a html file and send mail, I could see the file is opened as seen below. Name Age Days --------- ... (7 Replies)
Discussion started by: jayadanabalan
7 Replies
TABLIX(1)						       Tablix User's Manual							 TABLIX(1)

NAME
tablix2_output - Tablix data export utility SYNOPSIS
tablix2_output [ -o file ] [ options ] format file DESCRIPTION
Tablix is a powerful free software kernel for solving general timetabling problems. It uses a coarse-grained parallel genetic algorithm in combi- nation with other techniques to construct sensible timetables from XML formatted problem descriptions. Tablix can run on a single host as well as on a heterogeneous parallel virtual machine using PVM3. tablix2_output reads a timetable description in a XML format produced by Tablix from file and converts it into a number of human or machine read- able file formats. Alternatively, it can also read timetable information from a saved Tablix session. OPTIONS
-o FILE Write output to file FILE instead of the standard output. -s OPTIONS Set export module options. OPTIONS is a comma separated string of option=value pairs. Some options can only be enabled and do not accept a value. You can ommit the =value part with those (specifying the option alone will enable it). Supported options depend on the export format used. -d LEVEL Set the verbosity level, where LEVEL is one of the following: 0 (only fatal error messages are shown), 1 (fatal and non-fatal errors), 2 (all errors), 3 (all of the above plus some informational messages) or 4 (all of the above plus debug messages). -r FILE Use timetable information from a saved Tablix session in FILE (usually named save?.txt). Timetable with the lowest fitness value in the saved population is exported instead of any result stored in the XML file. If this option is used, the XML file does not need to contain a solution (i.e. the problem description file can be used). -h Shows a brief help message. -v Shows compile time options and copyright information. -i PATH Sets the path to export modules. By default the module path is set to the location where export modules were installed by make install command. FORMATS
htmlcss XHTML 1.1 output using CSS stylesheets and UTF-8 encoding for school scheduling. Creates one giant HTML file with all timetables (not recommended for large timetabling problems). Use the css option to specify an alternative stylesheet (if no stylesheet is specified, a default stylesheet is used). Use the namedays option (without a value) to enable day names. htmlcss2 XHTML 1.1 output using CSS stylesheets and UTF-8 encoding for school scheduling. Creates a directory containing one HTML file per timetable. Also supports timetables that span multiple weeks. With this module you have to specify the name of the directory where files are to be saved (you can not use standard output). Use the css option to specify an alternative stylesheet (if no stylesheet is specified, a default stylesheet is used). Use the namedays option (without a value) to enable day names. The footnotes option (without a value) changes the way events from conflicting resources are displayed. Without this option time slots occupied by events from conflicting resources are only marked. With this option some more information is displayed in the timetable (this is similar to timetables produced by the htmlcss module). With the weeksize option you can specify the number of days in a week. This can be used to produce timetables that span multiple weeks. For exam- ple: If the timetable has 15 days (the width of the "time" matrix and weeksize is set to 5, timetable will be displayed as 3 separate weeks. Default week size is 5 days. csv General "comma separated values" format in UTF-8 encoding suitable for import into spreadsheet programs and further processing. vcal vCalendar 2.0 (also known as iCal or iCalendar) compatible output. Use this format to generate a list of events for one class or one teacher that is suitable for import into cell phones, calendaring applications, etc. You have to specify all of the following options for this export module to work correctly: starttime Time and date of the first time slot in the timetable (a suitable time and date would for example be Monday, 4 September 2006, at 8:00 AM) written in basic ISO 8601 format (previous example in this format would be "20060904T080000"). length Length of each event in the timetable in minutes (for example "40") restype Type of resource for which to export the timetable. Use "teacher" for teachers and "class" for student classes. resource Name of the resource for which to export the timetable. gnutu XML format suitable for import into Gnutu Student's Schedule (see http://gnutu.org). This module can create a timetable for a single class of students or a directory with timetables for all defined classes. In the first case, specify the name of the class with the class option. If you do not specify this option all timetables will be generated. In this case you have to specify a name for the directory into which the timetables will be saved (use the -o option). By default the first timeslot begins at 8:00, the second at 9:00 and so on. If you would like to change that, make a file with one time slot time per line. Then specify this file with the hours option. BUGS
None currently known. AUTHOR
Tomaz Solc (tomaz.solc@tablix.org) SEE ALSO
tablix2(1), Tablix User's Manual, Tablix modules HOWTO, Tablix on Morphix HOWTO Tomaz Solc 2006-02-04 TABLIX(1)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy