05-07-2009
Thanks for the info.
And what would be the code if each line would have only 36 characters like:
agcgagcgtttgagctggctgaacgtttgcagtcgt
tggcttgagctggctgaacgtttgcagtccgacgac
I guess now the code would be a bit more complicated since for example with the read from position 2 to 37 I would have to fetch characters from line 1 and 2.
Best regards and thanks in advance,
Joćo
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
If I used this
wc -l *.dat ,it will count number of line in these files like this
1234 test1.dat
2345 test2.dat
3456 test3.dat
7035 total
can I add '|'(pipe) in the middle of those number and string like this
1234|test1.dat
2345|test2.dat
3456|test3.dat
Thanks in advance. (10 Replies)
Discussion started by: guitaroa47
10 Replies
2. Shell Programming and Scripting
hi
i have the following function, reading file line by line,
if line contains "Change state" i need to cut some fields otherwise i need to append the total line to the new file
function parse()
{
while read LINE
do
echo $LINE |grep -q "Change state"
if
then
echo $LINE |grep -q... (1 Reply)
Discussion started by: Satyak
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to erase the contents of a file and write a sql query into the file.
"" > tmp.txt
"select count\(\*\) \"Names\" from v\$ground where status\=\'Invalid\'\;" > tmp.txt
doesnt work, pls help. (2 Replies)
Discussion started by: happyrain
2 Replies
4. Shell Programming and Scripting
I have a control file which looks like this
LOAD DATA
INFILE '/array/data/data_Finished_T5_col_change/home/oracle/emp.dat'
PRESERVE BLANKS
INTO TABLE SCOTT.EMP
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(.................
..................)
How can i edit the... (1 Reply)
Discussion started by: mwrg
1 Replies
5. Shell Programming and Scripting
Hi,
This is the first time playing around with perl and need some help.
Assuming if i have a line of text that looks like this:
Date/Time=Nov 18 17:12:11;Device Name=192.168.1.1;Device IP=192.168.1.1;Device Class=IDS;Source IP=155.212.212.111;Source Name=UNKNOWN;Source Port=1679... (3 Replies)
Discussion started by: LuckyGuy
3 Replies
6. Shell Programming and Scripting
I have the following:
#! /bin/bash
foo="bar"
this="that"
vars="foovar=$foo\n\
thisvar=$this\n"
I want to write the following to a file:
foovar="bar"
thisvar="that"
Then in another script, I pull this file, and loop through it:
while read line; do
eval $line
done <... (3 Replies)
Discussion started by: Validatorian
3 Replies
7. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
8. Shell Programming and Scripting
hi,
i am trying to write a script to generate ouput in the following format:
##### buildappi abcd_sh nodebug.#####
##### buildappi ijk_sh nodebug.#####
The given string is as follows:
xtopSharedDLLs = "abcd_sh def_sh ijk_sh " \
+ "jkl_sh any_sh... (15 Replies)
Discussion started by: Rashid Khan
15 Replies
9. Shell Programming and Scripting
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Discussion started by: Raysf
2 Replies
10. Shell Programming and Scripting
I have this fastq file:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1
GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
LEARN ABOUT MOJAVE
mvwadd_wchnstr
curs_add_wchstr(3X) curs_add_wchstr(3X)
NAME
add_wchstr, add_wchnstr, wadd_wchstr, wadd_wchnstr, mvadd_wchstr, mvadd_wchnstr, mvwadd_wchstr, mvwadd_wchnstr - add an array of complex
characters (and attributes) to a curses window
SYNOPSIS
#include <curses.h>
int add_wchstr(const cchar_t *wchstr);
int add_wchnstr(const cchar_t *wchstr, int n);
int wadd_wchstr(WINDOW * win, const cchar_t *wchstr);
int wadd_wchnstr(WINDOW * win, const cchar_t *wchstr, int n);
int mvadd_wchstr(int y, int x, const cchar_t *wchstr);
int mvadd_wchnstr(int y, int x, const cchar_t *wchstr, int n);
int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wchstr);
int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wchstr, int n);
DESCRIPTION
These routines copy the array of complex characters wchstr into the window image structure at and after the current cursor position. The
four routines with n as the last argument copy at most n elements, but no more than will fit on the line. If n=-1 then the whole array is
copied, to the maximum number of characters that will fit on the line.
The window cursor is not advanced. These routines work faster than waddnstr. On the other hand, they do not perform checking (such as for
the newline, backspace, or carriage return characters), they do not advance the current cursor position, they do not expand other control
characters to ^-escapes, and they truncate the string if it crosses the right margin, rather than wrapping it around to the new line.
These routines end successfully on encountering a null cchar_t, or when they have filled the current line. If a complex character cannot
completely fit at the end of the current line, the remaining columns are filled with the background character and rendition.
NOTES
All functions except wadd_wchnstr may be macros.
RETURN VALUES
All routines return the integer ERR upon failure and OK on success.
PORTABILITY
All these entry points are described in the XSI Curses standard, Issue 4.
SEE ALSO
curses(3X), curs_addchstr(3X), curs_addwstr(3X)
curs_add_wchstr(3X)