10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I have a data file with new lines.
How to remove the newlines and should be showed in one line.
I tried using the command
tr -d '\n' filename
sed 's/\n//g' file name
Ex: 1 abc hyd is actual record
but in our scenario showing it as
1 abc
hydthis record should be like... (5 Replies)
Discussion started by: victory
5 Replies
2. Shell Programming and Scripting
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
3. UNIX for Dummies Questions & Answers
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
4. Shell Programming and Scripting
hi
i have a requirement to replace a string with another using sed and to get the result newline separated but after sed replacement the newline vanishes
below is sample code
#!/bin/ksh
set -x
string="name sam\nage 45 \nsport soccer"
echo $string
string=`echo $string | sed... (2 Replies)
Discussion started by: midhun19
2 Replies
5. Shell Programming and Scripting
Good morning,
I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need.
Here is the script as it is today:
#!/usr/bin/perl
my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
Discussion started by: brianjb
2 Replies
6. Shell Programming and Scripting
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. Solaris
deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies
8. Shell Programming and Scripting
Hello, there. I have a file that's a horrible, horrible mess. (Basically, it's an export from a firewall config.) The people who generated the file didn't think that putting a newline in the middle of a hostname would ever be a problem. It is.
Here's an example of the stuff in the file:
... (2 Replies)
Discussion started by: mikesimone
2 Replies
9. Shell Programming and Scripting
Hi everyone,
Since the previous time I received help from unix.com I have been encouraged to learn more.
going through 1 of the articles(View Article) on sed I found, it pointed an interesting situation.
Suppose the text is :
Romeo and Ethel the Dancer Moves Audience to Tears.
I... (3 Replies)
Discussion started by: hkansal
3 Replies
10. Shell Programming and Scripting
Hi All,
silly question that I'm sure is easy to answer for a more experienced coder...
I have a file called test.txt containing the following text...
need, to, break, this, line, into, individual, lines
using sed, I'd like to make the file look like this...
need
to
break
this
line... (5 Replies)
Discussion started by: newbie_coder
5 Replies
MALSYM(1) Malaga quick reference MALSYM(1)
NAME
malsym - compile a Malaga symbol file
SYNOPSIS
malsym symbol-file
malsym extended-symbol-file -use symbol-file
DESCRIPTION
Malaga is a development environment for natural-language grammars based on the Left-Associative Grammar formalism. Malaga grammars can be
used for automatic morphological and/or syntactic analysis.
The program malsym compiles a Malaga symbol file. Give it the symbol file (suffix .sym or .esym) that is to be translated as argument. If
an extended-symbol-file (suffix .esym) is to be compiled, you must add the option -use.
See info Malaga for details.
OPTIONS
-h[elp]
Print a help text about malsym's command line arguments and exit.
-u[se] symbol-file
Use the already compiled symbol-file as the base symbol file when compiling an extended symbol file.
-v[ersion]
Print malsym's version number and exit.
AUTHORS
Malaga has been developed by Bjoern Beutel. Numerous other people distributed to it. This manpage was originally written for the Debian
distribution by Antti-Juhani Kaijanaho.
SEE ALSO
malaga(1), mallex(1), malmake(1), malrul(1), malshow(1)
``Malaga 7, User's and Programmer's Manual''. Available in Debian systems via info Malaga, and, if the malaga-doc package is installed, in
various formats (DVI, Postscript, PDF, HTML) under /usr/share/doc/malaga-doc/.
Malaga 26 September 2006 MALSYM(1)