10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to extract all entries containing the following patterns: ccccta & ccccccccc from the following infile:
>P39PT-1224_Freq_900
cccctacgacggcattggtaatggctcccgcaagccatctctcttcagccaagg
>P39PT-784_Freq_2
cccctacgacggcattggtaatggcacccgcaagccatctctcttccccccccc
>P39PT-678_Freq_5... (4 Replies)
Discussion started by: Xterra
4 Replies
2. Shell Programming and Scripting
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Discussion started by: pchang
10 Replies
3. Shell Programming and Scripting
Hi i have a file in which i am doing some processing.
The code is as follows:
#!/bin/ksh
grep DATA File1.txt >> File2.txt
sed 's/DATA//' File2.txt | tr -d ‘ ‘ >> File4.xls
As you can see my output is going in a xl file.The output consist of four columns/feilds out of which the first... (20 Replies)
Discussion started by: Sharma331
20 Replies
4. Shell Programming and Scripting
Legends,
I have a file /tmp/list.txt
I want to find "/bin/" and replace it with "/log/"
I tried the follwoing but no luck
Sandy: /tmp> perl -pi -e 's/\/bin\/\/log\/' /tmp/list.txt >> /tmp/try
Substitution pattern not terminated at -e line 1.
AND,
Sandy: /tmp> perl -pi -e... (2 Replies)
Discussion started by: sdosanjh
2 Replies
5. Shell Programming and Scripting
I'm trying to write a script that will do an ls of a location, echo it into a file, and then read that file and selectively delete files/folders, so it would go something like this:
cd $CLEAN_LOCN
ls >>$TMP_FILE
while read LINE
do
if LINE = $DONTDELETE
skip
elseif LINE =... (2 Replies)
Discussion started by: MaureenT
2 Replies
6. UNIX for Dummies Questions & Answers
Dear Members,
Problem is suppose i have 50 lines in a file, 40 lines last character is "\" and the remaining 10 lines are good(i mean these 10 lines do not have "\" character)
How can i remove this character from the file.
Thanks (1 Reply)
Discussion started by: sandeep_1105
1 Replies
7. UNIX for Advanced & Expert Users
Dear users,
I am new to AWK and have been battling with this one for close to a week now. Some of you did offer some help last week but I think I may not have explained myself very well. So I am trying again.
I have a dataset that has the following format where the datasets repeat every... (5 Replies)
Discussion started by: sda_rr
5 Replies
8. Shell Programming and Scripting
Is there a way to do a find and replace in a .gz file in a single script ?
I can always unzip, find and replace and then zip it again but would hate to do this everytime.
Thanks !
Vivek (1 Reply)
Discussion started by: vashah
1 Replies
9. Shell Programming and Scripting
I have a rather long csh script that works, but it's terribly ungraceful and takes a while from various loops. I only know enough code to get myself into trouble, so I'm looking for some guidance.
I have a large file that is separated at intervals by the same line, like this:
... (2 Replies)
Discussion started by: fusi0n
2 Replies
10. UNIX for Dummies Questions & Answers
I build several files by using the cut command to grab select fields(columns) from a really bid csv file. Each file is one column of data. I then put them together using paste command. Here is the code built in tcsh:
cut -d , -f 1 some.csv > 1.csv
cut -d , -f 10 some.csv > 10.csv
paste 1.csv... (2 Replies)
Discussion started by: yankee428
2 Replies