10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to get specific parts in a large file.
I need to:
Get a line containing an IP address, and read from there to another line saying ***SNMP-END***
So, I have the start and the end well defined, but the problem is that apparently the awk command using the -F option doesn't work... (17 Replies)
Discussion started by: ocramas
17 Replies
2. Shell Programming and Scripting
Hello,
I was wondering how is it possible if I use this command:
awk 'NR >= 998 && NR <= 1000' file.txtTo exit after parsing the 1000th line ( last line targeted) ???
I observed that when executing this command for a large file, if the range of lines is at the beginning of the file it is... (2 Replies)
Discussion started by: black_fender
2 Replies
3. Shell Programming and Scripting
Hi guys!
I'm new to scripting and I need to write a script in awk.
Here is example of file on which I'm working
ATOM 4688 HG1 PRO A 322 18.080 59.680 137.020 1.00 0.00
ATOM 4689 HG2 PRO A 322 18.850 61.220 137.010 1.00 0.00
ATOM 4690 CD ... (18 Replies)
Discussion started by: grincz
18 Replies
4. Shell Programming and Scripting
Hi,
I have following path:
set file_path = D:/forums/prac/somedir/new1/file1.txt
or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt
I need to grep "somedir" from file path. In this case preceding directory "prac" remains same for both the paths, but directories preceding... (7 Replies)
Discussion started by: sarbjit
7 Replies
5. Shell Programming and Scripting
Hi All
I'm struggling a bit here :(
I need a way of joining lines contained in a text file. I've seen numerous SED and AWK examples and none of them seem to be working for me.
The text file has 4 lines:
DELL1427
DOC
30189342
79
Now bear with me on this one as I'm actually... (4 Replies)
Discussion started by: huskie69
4 Replies
6. Shell Programming and Scripting
Hello, I have a file including some lines as follows
person (1):
a
d
t
person (2):
f
h
j
person (3):
z
x
v
.
.
. (8 Replies)
Discussion started by: rpf
8 Replies
7. Shell Programming and Scripting
Hi,
snp.txt
CHR_A SNP_A BP_A_st BP_A_End CHR_B BP_B SNP_B R2 p-SNP_A p-SNP_B
5 rs1988728 74904317 74904318 5 74960646 rs1427924 0.377333 0.000740085 0.013930081
5 ... (12 Replies)
Discussion started by: genehunter
12 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am trying to extract lines bsed on pattern matching../mp straight-flow/
Extracted output should be saved in meta_string , but the code is not working in that manner,saving repeated lines. can anyone please suggest where am i going wrong.
/mp straight-flow/ {... (6 Replies)
Discussion started by: madhaviece
6 Replies
9. Shell Programming and Scripting
We have the following statement working in CGYWIN, but when we move the program to Solaris 10 it fails.
x=`echo "ABC196925XYZ" | grep -o --only-matching "\{6\}"`
How can we use AWK or SED to extract only the number from the string?
The following outputs the entire string. We only want... (5 Replies)
Discussion started by: James Clark
5 Replies
10. Shell Programming and Scripting
Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Discussion started by: ropers
2 Replies