10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
2. Shell Programming and Scripting
Hi Experts,
Kindly help me to resole the line break issue mentioned below sample xml file:
sample source File:
==============
<?!New XML File><NEWRECORDS xmlns... (3 Replies)
Discussion started by: UnniVKN
3 Replies
3. UNIX for Dummies Questions & Answers
I searched and found "echo -n" and "printf" are solution for this, but they are not
here:
$ echo "hello" >> test
$ cat test
hello
$ echo -n "world" >> test
$ cat test
hello
world
$ echo -n " seriously?" >> test
$ cat test
hello
world seriously?
This is not successful... (15 Replies)
Discussion started by: stunn3r
15 Replies
4. Shell Programming and Scripting
Hi All,
I am stuck for quite sometime now. Below is a line in my file -
GS|ED|001075|001081|20110626|1806|100803|X|004010ST|130|100803001
This line occurs only once and it is the second line.
I have to break this line into two lines from ST (bold) such that it looks like -... (5 Replies)
Discussion started by: ihussain
5 Replies
5. Shell Programming and Scripting
I got an XML file(file name TABLE.xml) which the data format has line breaks(with no Spaces, no Nulls, no characters between each line), I need to write a KSH script which gives me the data in single line as format shown below
My input file which have line breaks:
<TABLE>
<TABLE-ROW>
<S_NO>... (7 Replies)
Discussion started by: pred55
7 Replies
6. Shell Programming and Scripting
Hi,
we are trying to process a csv file,in which we are getting data with line breaks.How to remove the line break character in the file?
when i try to print the line break charcter using od -c,it gives as '\n' character for both line break and line feed.
Please provide your valuable... (6 Replies)
Discussion started by: cnraja
6 Replies
7. Shell Programming and Scripting
Hi Experts,
My requirement is to read the csv file and need to remove if any line break in it.
sample data:
Row1: "Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
Row2:"Tønsberg, Brygga Kino SF",Tønsberg,202-1,
Tønsberg SF 4,202-1-4
Expected data:
Row1: "Oslo, Symra... (6 Replies)
Discussion started by: cnraja
6 Replies
8. Shell Programming and Scripting
How do I filter only comments and still keep Line breaks at the end of the line!?
This is one of the common tasks we all do,, How can we do this in a right way..!?
I try to ignore empty lines and commented lines using following approach.
test.sh
# \040 --> SPACE character octal... (17 Replies)
Discussion started by: kchinnam
17 Replies
9. Shell Programming and Scripting
Hi,
Apologies if this has been asked before, but I searched and was not able to find an answer. It's probably a simple question to answer for those of you with some experience, though...
I have a relatively long string where tokens are separated by the colon (':') character. Let's say the... (10 Replies)
Discussion started by: johnemb
10 Replies
10. Shell Programming and Scripting
All,
I'm a newbie at shell scripting and regular expressions and I just need to take a file that's arranged like the one below, remove all leading and trailing whitespace and add a line break after each word. I've been able to remove a few spaces using various awk, sed and Perl scripts, but... (7 Replies)
Discussion started by: moose1
7 Replies