10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file with two columns like the following
FILE1:
chr1 61042
chr1 61153
chr1 61446
chr1 61457
chr1 61621
chr10 61646
chr10 61914
chr10 62024
chr10 62782
Alos, I have another file
FILE2: (13 Replies)
Discussion started by: rkk
13 Replies
2. Shell Programming and Scripting
I have 2 files, and I want to count how many lines contain matching words.
Example:
file1
a_+b
a_+b_+c
file2
ab a_+b
a_+bc
I want to get 1, as the the first line of file1 is a substring of the first line of file2. While the second line isn't.
I suspect using sdiff, but not sure how to... (3 Replies)
Discussion started by: Viernes
3 Replies
3. Shell Programming and Scripting
Hi, I have one file, I need to check if file exist or not and then remove the lines which starts with ?
My file1.out data is some thing
abcabcppp
xyzxyzpqr
?????????
?????????
Output should be in test.out
abcabcppp
xyzxyzpqr
I am getting the output as below but the File does not exist... (4 Replies)
Discussion started by: Ramyajiguru1
4 Replies
4. Shell Programming and Scripting
I try to count number of lines of a data.txt file and then if number of lines is greater than 1 then email me the file.
I could not find what is wrong with my code, hope you can point out the mistake i made
#! /bin/ksh
count =`cat /from/file/data.txt | wc -l`
if ]; then
mailx -s... (4 Replies)
Discussion started by: sabercats
4 Replies
5. Solaris
I have a file that I need to merge with another like file. Normally I remove the trailer reocrd and merge the file and update the trailer record of the second file. I did a WC -l on the first file before I removed the trailer record, and again afterwards. The count came back the same. I opened the... (6 Replies)
Discussion started by: Harleyrci
6 Replies
6. Shell Programming and Scripting
Hi!
I have a file that looks like this:
AAG
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGA
----------------------------------------------------------------------
Number of residues in the repeat = 3
AGG
... (2 Replies)
Discussion started by: vanesa1230
2 Replies
7. Shell Programming and Scripting
Please help in the following problem:
Input is:
Pritam
123
456
Patil
myname
youname
Pritam
myproject
thisproject
iclic
Patil
remaining text
some more text
I need the command which will display the no of lines between two words in the whole file.
e.g. Display all the no of lines... (5 Replies)
Discussion started by: zsudarshan
5 Replies
8. Shell Programming and Scripting
I have a data file in the following format (refer to input file) with multiple lines containing some information. I need an output file to loop thorough the input file with summarized information as seen below (refer to output file) ‘Date Time' and ‘Beta Id' input file values should be concatenated... (7 Replies)
Discussion started by: shekharaj
7 Replies
9. Shell Programming and Scripting
Hello
Its a simple issue i suppose.I am trying to write a script which first logson to other server via SSH & tries to stop a process ,then returns to its originator & completes a task & finally jumps to that second servers again & starts the (stopped) process.
What i am not able to implement... (2 Replies)
Discussion started by: ak835
2 Replies
10. UNIX for Dummies Questions & Answers
What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
Discussion started by: kthatch
6 Replies