10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear all,
I have huge txt file with the input files for some setup_code. However for running my setup_code, I require txt files with maximum of 1000 input files
Please help me in suggesting way to break down this big txt file to small txt file of 1000 entries only.
thanks and Greetings,
Emily (12 Replies)
Discussion started by: emily
12 Replies
2. Shell Programming and Scripting
Hi,
I have a file which contains many lines. Some of them are longer than 50 chars. I want to break those lines but I don't want to break words, e.g. the file
This is an exemplary text which should be broken aaaaaa bbbbb ccccc
This is the second line
This line should also be broken... (3 Replies)
Discussion started by: wenclu
3 Replies
3. UNIX for Dummies Questions & Answers
Hey,
I've been trying to break a massive fasta formatted file into files containing each gene separately. Could anyone help me? I've tried to use the following code but i've recieved errors every time:
for i in *.rtf.out
do
awk '/^>/{f=++d".fasta"} {print > $i.out}' $i
done (1 Reply)
Discussion started by: Ann Mc Cartney
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
BUD31 YRI 2e-06:CXorf15 YRI 3e-06:CREB1 YRI 4e-06
FLJ21438 CEU 3e-07:ETS1 CEU 8e-07:FGD3 CEU 2e-06
I want to modify the text file so that everytime there is a ":", a new line is introduced so that the document looks... (3 Replies)
Discussion started by: evelibertine
3 Replies
5. Shell Programming and Scripting
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
Hey,
I have to take one CSV file and break into more files. Let's I have a file prices.csv and the data in the file like
1,12345
1,34567
1,23456
2,67890
2,77720
2,44556
2,55668
10,44996
based on the first column, I want to create files. in this example 1 is repeated three times... (12 Replies)
Discussion started by: bond2222
12 Replies
7. Shell Programming and Scripting
Hi,
I have a code as given below
Set -A _Category="A\
B\
C"
for _cat in ${_Category}
do
sed -e "s:<TABLE_NAME>:${_cat}:g" \
-e "s:<date>:${_dt}:g" \
${_home}/skl/sq1.sql >> ${_dest}/del_${_dt}.sql
fi
... (4 Replies)
Discussion started by: mr_manii
4 Replies
8. Shell Programming and Scripting
I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies
9. Shell Programming and Scripting
Hi,
I have a file that looks like this (tab deliminited).
MAT1 YKR2 3
MAT1 YMR1 2
MAT1 YFG2 2
MAT2 YLM4 4
MAT2 YHL2 1
BAR1 YKR2 3
BAR1 YFR1 4
BAR1 YMR1 1
What I want to do is break this file down into multiple files. So the result will look like this:
File 1... (2 Replies)
Discussion started by: kylle345
2 Replies
10. UNIX for Dummies Questions & Answers
for file in `ls *.txt`
do
sed '/s/old/new/g' $file > /tmp/tempfile.tmp
mv /tmp/tempfile.tmp $file
done
the txt files names look like "text file one.txt", "text file two.txt"
but when I run it, all i get is:
sed: 0602-419 Cannot find or open file text.
sed: 0602-419 Cannot find or... (3 Replies)
Discussion started by: DeuceLee
3 Replies