Sponsored Content
Full Discussion: UNIX file with Newlines
Top Forums Shell Programming and Scripting UNIX file with Newlines Post 303031441 by RudiC on Thursday 28th of February 2019 09:38:11 AM
Old 02-28-2019
It's a bit difficult to believe that a one line record should be wrapped in two lines, automatically, out of the blue sky, UNLESS you have some formatting issues. We have too little info to judge. So - please enlighten us and tell us how and why your "scenario showing it as" a split line. You might describe the scenario, and the tool(s) used for it. A hex dump of the data records might help as well.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing inserted newlines from a fileld of fixed width file.

Hi champs! I have a fixed width file in which the records appear like this 11111 <fixed spaces such as 6> description for 11111 <fixed spaces such as 6> some more field to the record of 11111 22222 <fixed spaces such as 6> description for 22222 <fixed spaces such as 6> some more field to the... (8 Replies)
Discussion started by: enigma_1
8 Replies

2. 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

3. Shell Programming and Scripting

Padding lines in a file with newlines

Hi Guys, I have a file as shown below: 55 6 77 8 88 98 7 85 45 544 1 33 32 13 13 (5 Replies)
Discussion started by: npatwardhan
5 Replies

4. UNIX for Dummies Questions & Answers

finding string in very long file without newlines

What's the best way to find a string in a very long file without newlines in Unix? The standard utility I'm aware of for finding a string in a single file is grep, but for a long file without newlines, I think the output is just going to be the input. I suppose I could use sed to replace the... (5 Replies)
Discussion started by: aaronpoley
5 Replies

5. Shell Programming and Scripting

'for LINE in $(cat file)' breaking at spaces, not just newlines

Hello. I'm making a (hopefully) simple shell script xml parser that outputs a file I can grep for information. I am writing it because I have yet to find a command line utility that can do this. If you know of one, please just stop now and tell me about it. Even better would be one I can input... (10 Replies)
Discussion started by: natedawg1013
10 Replies

6. Shell Programming and Scripting

Extract pattern before two newlines

Hi All, My file looks like this: 1 2 3 3 4 5 6 7 8 8 7 6 3 4 5 3 6 7 3 4 5 1 2 4 3 4 6 2 4 6 As you can see there are two newlines after the next pattern of numbers begin. (4 Replies)
Discussion started by: shoaibjameel123
4 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 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

10. Shell Programming and Scripting

File formatting with newlines

Hi All - I am in need of some help in formating the below file Requirement - 1) replace newlines with space 2) replace '#~# ' with newline ----------------------- sample inputfile a I|abc|abc|aaa#~# I|sddddd|tya|dfg sfd ssss#~# I|tya1|tya2|dfg|sfd|aaa#~#... (5 Replies)
Discussion started by: J1nx007
5 Replies
HFS(1)                                                        General Commands Manual                                                       HFS(1)

NAME
hfs - shell for manipulating HFS volumes SYNOPSIS
hfs [hfs-path [partition-no]] DESCRIPTION
hfs is an interactive command-oriented tool for manipulating HFS volumes. hfs is based on the Tcl interpreter, so basic Tcl constructs can be used in addition to the following commands: mount path [partition-no] The specified UNIX path is opened as an HFS volume. If a partition number n is specified and the volume source is located on a par- titioned medium, the nth discovered HFS partition will be mounted. The default partition-no is 1. umount [path] The volume previously mounted from the specified path (or the current volume, if none specified) is unmounted. vol path The volume previously mounted from the specified path is made current. info General information about the currently mounted volume is displayed. This information is also displayed automatically when the vol- ume is mounted. pwd The full path to the current working HFS directory is displayed. cd [hfs-path] The current working directory is changed to the given HFS path. If no path is given, the working directory is changed to the root of the volume. dir [hfs-path] A directory listing of the specified HFS directory is displayed. If no path is given, the contents of the current working directory are shown. mkdir hfs-path A new, empty directory is created with the specified path. rmdir hfs-path The specified directory is removed. It must be empty. create hfs-path [type [creator]] An empty file is created with the specified path. The Macintosh type and creator may be specified, or they will default to TEXT and UNIX, respectively. del hfs-path Both forks of the specified file are deleted. stat hfs-path Status information about the specified HFS path-identified entity is displayed. cat hfs-path The data fork of the specified HFS file is displayed. copyin unix-path [hfs-path [mode]] The specified UNIX file is copied to the named HFS destination path. Unless specified otherwise, the file will be copied into the current HFS working directory using a heuristically chosen mode. The mode may be one of: macb (MacBinary II), binh (BinHex), text, or raw. copyout hfs-path [unix-path [mode]] The specified HFS file is copied into the named UNIX destination path. Unless specified otherwise, the file will be copied into the current UNIX working directory using a heuristically chosen mode. The modes are the same as for copyin. format path [partition-no [volume-name]] The specified UNIX path is initialized as an empty HFS volume with the given name, and this volume is subsequently mounted. The default volume name is Untitled. The shell is scriptable, however it should be understood that the above commands are actually implemented by Tcl procedures prefixed with the character "h", e.g. hmount, hcd, etc., in order to avoid name collisions with other Tcl utilities. The "h" may be omitted in interac- tive use for convenience. SEE ALSO
hfsutils(1), xhfs(1) BUGS
cat can only display the data fork of a file. Text translations are performed unconditionally on the output. Furthermore, binary data can- not be handled properly from within Tcl scripts since the character with value 0 cannot be represented in Tcl strings. Use copyout to copy files without these limitations. AUTHOR
Robert Leslie <rob@mars.org> HFSUTILS 15-Jan-1997 HFS(1)
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy