10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello I am a new unix user, and I have a work related task to compare 2 files and print all of the lines in file 2 that contain a string from file 1 Note: the fields are in different columns in the files. I suspect the is a good use for awk? Thanks for your time & help
File 1
123 232 W343... (6 Replies)
Discussion started by: KevinRidley
6 Replies
2. Shell Programming and Scripting
Hello everyone,
I have a little script below:
die "Usage infile outfile reGex" if @ARGV != 3;
($regex) = @ARGV;
open(F,$ARGV) or die "Can't open";
open(FOUT,"+>$ARGV") or die "Can't open";
while (<F>)
{
print FOUT if /$regex/.../$regex/;
}
No matter what I give $regex on the... (2 Replies)
Discussion started by: new bie
2 Replies
3. Shell Programming and Scripting
Hi,
I have two files. 1st file has 1 column (huge file containing ~19200000 lines) and 2nd file has 2 columns (small file containing ~6000 lines).
#################################
huge_file.txt
a
a
ab
b
##################################
small_file.txt
a 1.5
b 2.5
ab ... (4 Replies)
Discussion started by: AshwaniSharma09
4 Replies
4. Shell Programming and Scripting
Hi all,
This should be very easy but I can't figure it out...
I have a file that looks like this:
@SRR057408.1 FW8Y5CK02R652T length=34
AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT
+SRR057408.1 FW8Y5CK02R652T length=34
FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8
@SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies
5. Windows & DOS: Issues & Discussions
Hi
I want to print lines 20-30 from a file.
In UNIX , this command will work
sed -n '20,30p' file
However what is the equivalent command in DOS ?
Pls help me ! (2 Replies)
Discussion started by: dashing201
2 Replies
6. Shell Programming and Scripting
Hi All,
File that I have:
<ct>
<name>group
<value>1
<value>2
<value>3
</ct>-->file
The output that I needed is
<ct>
<name>group
<value>1 -->file1
<ct>
<name>group
<value>2 -->file2 (6 Replies)
Discussion started by: natalie23
6 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
please help me to make a loop!
I have two files.
File 1
2
4
7
File2
1 abc
2 cde
3 ghgj
4 kjhn
5 mbm
6 hghj
7 hgjk
I need to write a script that reads lines from File1, finds them in File2 and puts in File3, so File3 should look like this: (3 Replies)
Discussion started by: coppuca
3 Replies
8. UNIX for Advanced & Expert Users
i want to print the data between two line numbers in file to another file.
which command should i use
i tried sed command . i am storing the line numbers in two variables say L1,L2. but $L1 and $L2 are not working in sed command.
is there any other command to do this
reply soon (5 Replies)
Discussion started by: kamesh83
5 Replies
9. Shell Programming and Scripting
Hi ALL,
I want to print lines from file using certain conditions
for exmple:
# The following commands will create a new control file and use it
# to open the database.
# The contents of online logs will be lost and all backups will
# be invalidated. Use this only if online logs are... (25 Replies)
Discussion started by: jack00423
25 Replies
10. Shell Programming and Scripting
In other news, I have a colors text file with hundreds of lines, and I want to print only the even numbered lines. for example I have this file looks something like this:
ALLCOLORS.TXT
red red green red
blue red red red
green red red blue
green green green
blue blue blue
red blue blue blue... (1 Reply)
Discussion started by: ajp7701
1 Replies