Sponsored Content
Top Forums Shell Programming and Scripting Remove improperly placed newlines Post 302400658 by ldapswandog on Wednesday 3rd of March 2010 09:35:04 PM
Old 03-03-2010
This will find the lines with commas and create a single line as long as there are not more than three lines with commas in a row
Code:
sed '/,/N;s/\n//;/,/N;s/\n//' file

 

10 More Discussions You Might Find Interesting

1. Solaris

Improperly formatted value for 'tftp-server' error while booting the target from LAN

Hi, I wish to install solaris 10 on a target machine (t1000) by using Jumpstart. I have configured by jumpstart environment for the same. When i boot the target with the option "boot net -v install" i get the following error... {0} ok boot net -v install Boot device: /pci@7c0/pci@0/network@4... (3 Replies)
Discussion started by: hemalsid
3 Replies

2. Shell Programming and Scripting

Need to remove improperly formatted fortran output line from files, tried sed

I have been trying to remove some improperly formatted lines of output from fortran code I have been using. The problem is that I have some singularities in the math for some points that causes an incorrectly large value to be reported that exceeds the normal formating set in the code resulting in... (2 Replies)
Discussion started by: gillesc_mac
2 Replies

3. Shell Programming and Scripting

Newlines in shell variables

Hello, I'm trying to create a shell variable with newlines inside it, so that when I echo the variable and pipe it to, say, awk, it output with the newlines. Why is this so problematic? I frankly don't know, but BASH seems to be stripping my variable of newlines. Here's an example $ cat... (5 Replies)
Discussion started by: narcvs
5 Replies

4. Shell Programming and Scripting

awk - need to remove unwanted newlines on match

Context: I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ): 1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed 2 her true love Sho to Tokyo to... (6 Replies)
Discussion started by: Bubnoff
6 Replies

5. Shell Programming and Scripting

Transpose with two newlines as delimiter

Hi Guys, I have data in a file as follows: a 1 2 3 b 4 5 6 a 6 7 8 a 4 7 9 b 6 8 5 c 0 8 7 So the number of rows which have data is variable (2 for the first group, one for the second group and three for the third group), but the delimiters between the... (10 Replies)
Discussion started by: npatwardhan
10 Replies

6. Shell Programming and Scripting

sed remove newlines and spaces

Hi all, i am getting count from oracle 11g by spooling it to a file. Now there are some newline characters and blank spaces i need to remove these. pl provide me a awk/sed solution. the spooled file is attached. i tried this.. but not getting req o/p (6 Replies)
Discussion started by: rishav
6 Replies

7. Shell Programming and Scripting

removing newlines after a certain word.

Hello! This is my first post here. I have a file with text like: A</title> B C</title> D I need to format it to: AB CD I am trying to use sed: sed 's/<//title>\n/ /g' file > newfile to delete </title> and the newline character, but the file is unchanged because there are... (3 Replies)
Discussion started by: DaytonCPS
3 Replies

8. UNIX for Dummies Questions & Answers

Remove newlines

Hi buddy's my file are like this: s.no,name,band,sal 1,"suneel",,10 2,"bargav sand",,20 30," ebdug gil",,4 but i want s.no,name,band,sal 1,"suneel",,10 2,"bargav sand",,20 30,"ebdug gil",,4 any command or Shell script for this. please help me it's urgent to implement (33 Replies)
Discussion started by: Suneelbabu.etl
33 Replies

9. UNIX for Dummies Questions & Answers

Using find with awk to remove newlines

I want to list all html files present in a directory tree, the remove the newline and get one string with a space between files find /home/chrisd/Desktop/seg/geohtml/ -name '*.html' | awk BEGIN{FS=\r} '{print}' ---------- Post updated at 06:47 PM ---------- Previous update was at 06:25 PM... (5 Replies)
Discussion started by: kristinu
5 Replies

10. UNIX for Beginners Questions & Answers

Remove newlines and carriage return from a csv file using UNIX

I need to remove new lines and carriage returns from csv file. Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
Discussion started by: A_Gaddale
3 Replies
SHOREWALL-INIT(8)						  [FIXME: manual]						 SHOREWALL-INIT(8)

NAME
shorewall-init - Companion package SYNOPSIS
/etc/init.d/shorewall-init [start|stop] DESCRIPTION
Shorewall-init is an optional package (added in Shorewall 4.4.10) that can be installed along with Shorewall, Shorewall6, Shorewall-lite and/or Shorewall6-lite. It provides two key features: 1. It can close (stop) the firewall during boot prior to starting the network. This can prevent unwanted connections from being accepted after the network comes up but before the firewall is started. 2. It can interface with your distribution's ifup/ifdown scripts and/or NetworkManager to allow firewall actions when an interface starts or stops. These two capabilities can be enabled separately. After you install the shorewall-init package, you can activate it by modifying the Shorewall-init configuration file: o On Debian-based system, the file is /etc/default/shorewall-init. o On other systems, the file is /etc/sysconfig/shorewall-init. To activate the safe boot feature, edit the configuration file and set PRODUCTS to a space-separated list of Shorewall products that you want to be closed before networking starts. Example: PRODUCTS="shorewall shorewall6" You also must insure that the compiled scripts for the listed products are compiled using Shorewall 4.4.10 or later. Shorewall shorewall compile Shorewall6 shorewall6 compile Shorewall-lite On the administrative system, enter the command shorewall export firewall from the firewall's configuration directory. Shorewall6-lite On the administrative system, enter the command shorewall6 export firewall from the firewall's configuration directory. The second feature (ifup/ifdown and NetworkManager integration) should only be activated on systems that do not use a link status monitor line swping or LSM. o Edit the configuration file and set IFUPDOWN=1 For NetworkManager integration, you will want to disable firewall startup at boot and delay it to when your interface comes up. For this to work correctly, you must set the required or the optional option on at least one interface then: o On Debian-based systems, edit /etc/default/product for each product listed in the PRODUCTS setting and set startup=0. o On other systems, use the distribution's service control tool (insserv, chkconfig, etc.) to disable startup of the products listed in the PRODUCTS setting. On a laptop with both ethernet and wireless interfaces, you will want to make both interfaces optional and set the REQUIRE_INTERFACE option to Yes in shorewall.conf[1](5) or shorewall6.conf[2] (5). This causes the firewall to remain stopped until at least one of the interfaces comes up. FILES
/etc/default/shorewall-init (Debian-based systems) or /etc/sysconfig/shorewall-init (other distributions) SEE ALSO
shorewall(8), shorewall-accounting(5), shorewall-actions(5), shorewall-blacklist(5), shorewall-hosts(5), shorewall_interfaces(5), shorewall-ipsets(5), shorewall-maclist(5), shorewall-masq(5), shorewall-nat(5), shorewall-netmap(5), shorewall-params(5), shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5), shorewall-rtrules(5), shorewall-routestopped(5), shorewall-rules(5), shorewall.conf(5), shorewall-secmarks(5), shorewall-tcclasses(5), shorewall-tcdevices(5), shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5), shorewall-zones(5) NOTES
1. shorewall.conf http://www.shorewall.net/manpages/shorewall.conf.html 2. shorewall6.conf http://www.shorewall.net/manpages/../Manpages6/shorewall6.conf.html [FIXME: source] 06/28/2012 SHOREWALL-INIT(8)
All times are GMT -4. The time now is 12:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy