10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file that look like this:
>Muestra-1
agctgcgagctgcgaccc
gggttatata
ggaagagacacacacaccccc
>Muestra-2
agctgcg
agctgcgacccgggttatataggaagagac
acacacaccccc
>Muestra-3
agctgcgagctgcgaccc
gggttatata
ggaagagacacacacaccccc
I use the following sed script to remove newlines from... (2 Replies)
Discussion started by: Xterra
2 Replies
2. Shell Programming and Scripting
Here is the text that I was to run sed on. In this text I want to insert a semi colon ';' before 'select a13.STORE_TYPE STORE_TYPE,' and after 'from ZZMR00 pa11'
Input text:
insert into ZZMQ01
select pa11.STATE_NBR STATE_NBR,
pa11.STORE_TYPE STORE_TYPE,
... (9 Replies)
Discussion started by: v_vineeta11
9 Replies
3. Shell Programming and Scripting
Hello All,
I have two files with delimited |
file 1 :
1|2|3
11|12|13
22|23|24
and file 2 :
1|4|5|6
11|14|15|16
22|25|26
I want to replace the value '1' in file 2 with the values in file 1 '1|2|3'
so the final output will look like
1|2|3|4|5|6
11|12|13|14|15|16
22|23|24|25|26 (3 Replies)
Discussion started by: ArunKumarM
3 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
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
6. Shell Programming and Scripting
The code below gives the string "test1.txt" even though "tessdsdt" does not match "test1.txt". I would like to return "" if there is no match and return some kind of error that I can capture and decide what to do.
echo test1.txt | awk -v src="tessdsdt" -v dst="test" '{sub(src,dst); print}' (16 Replies)
Discussion started by: kristinu
16 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
8. UNIX for Dummies Questions & Answers
Guyz
I have been using tr command to replace symbol.
I would like to add a symbol to all newlines in a textfile with out replacing them
input
\n (i mean new line)
a
\n
b
\n
c
output
>
a
>
b
>
c (0 Replies)
Discussion started by: repinementer
0 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I have a script which uses sed to replace one string with another. The problem is, the string to be matched, and its replacement are coming in as two command line arguments $1 and $2
$1 and $2 can be absolutely anything, but both should be treated purely as strings. My sed command... (1 Reply)
Discussion started by: mark007
1 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