Search Results

Search: Posts Made By: zorrox
3,280
Posted By zorrox
Thank you again. Mr Scrutinizer codes have...
Thank you again.

Mr Scrutinizer codes have this error using Bash on Debian:
read: -A: invalid option
read: usage: read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt]...
3,280
Posted By zorrox
Thank you to both of you. Now, I am having...
Thank you to both of you.

Now, I am having problem when there is an empty item in the input. The subsequent item in the array does not take the empty item which causes the output of the script to...
3,280
Posted By zorrox
Multiple variables using awk and for loop for web form submission
Hi

My goal is to fill an HTML form and submit.

What I have managed to do:

1. curl command to fill up the form and submit
2. a file which has the input

curl command:
curl -v -b...
1,605
Posted By zorrox
Parse qshape output and send email alert
Hi

I need help to do this. This is the output of qshape:

user$ qshape deferred|head

T 5 10 20 40 80 160 320 640 1280 1280+
...
5,854
Posted By zorrox
Select answers from multiple questions using shell script - Solved
Thank you sir. I think that is all. I really appreciate your help.
5,854
Posted By zorrox
Thank you very much again sir. It is working fine...
Thank you very much again sir. It is working fine now. However, when one answer has multiple lines, for example:

A. [edit schedulers]
user@host# show
scheduler no-weekends {
daily all-day; ...
5,854
Posted By zorrox
Here you go: Some lines...... QUESTION NO:...
Here you go:

Some lines......
QUESTION NO: 89

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?

A. 0
B. 1
C. 4
D. 8

Answer: B...
5,854
Posted By zorrox
to be clearer the output is this: QUESTION...
to be clearer the output is this:

QUESTION NO: 89
B.

QUESTION NO: 90
A.
B. bbbbbbbbbbbb
E. eeeeeeeeeeeeeeeee

QUESTION NO: 97
B.
5,854
Posted By zorrox
Thank you Scrutinizer. It works. It just...
Thank you Scrutinizer. It works.

It just that in the actual file, the format is really like this:

The question?

A. aaaaaa
B. bbbbb
C. ccccc
D. ddddddd

There is no word "answer" after...
5,854
Posted By zorrox
Select answers from multiple questions using shell script
I have a text file in this format


Some lines....
Question no: 1

The question?

A. Answer 1
B. Answer 2
C. Answer 3
D. Answer 4

Answer:B
Some lines....

Question no: 2

The...
4,725
Posted By zorrox
Thanks Akshay. Your codes work. Could you please...
Thanks Akshay. Your codes work. Could you please explain the codes?
4,725
Posted By zorrox
file content: abc begin def ghi ...
file content:
abc
begin
def
ghi
pattern1
end
begin
pattern1
jkl
end
begin
lyt
end
mno
pqr
begin
stu
vwx
yza
4,725
Posted By zorrox
Thanks SriniShoo, The problem with that...
Thanks SriniShoo,

The problem with that command is it will only show the line that contains the pattern, not the range that contains the pattern. How to fix this?
4,725
Posted By zorrox
awk with range but matches pattern
To match range, the command is:

awk '/BEGIN/,/END/'

but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this:

awk...
10,299
Posted By zorrox
Thanks RudiC, How about the second...
Thanks RudiC,

How about the second requirement? Is there a simpler way to do this? The first requirement is still the same but I want "abc" matches if only "xyz" matches too.

---------- Post...
10,299
Posted By zorrox
Thanks Scrutinizer. Yes. It works. Now I...
Thanks Scrutinizer. Yes. It works.

Now I just realize that I want the first pattern to match only if the second pattern matches. For example let say pattern abc and xyz appear in the file...
10,299
Posted By zorrox
awk multiple search and if conditions
Hi

I wanted to search for 2 patterns. These patterns are matched only if the if condition is matched for example:

This is the kind of command that I have in mind which is obviously not correct:...
9,056
Posted By zorrox
How can I make it so that the whole line will...
How can I make it so that the whole line will also be displayed, not just the min, max or avg?
9,056
Posted By zorrox
Count time min/max/average for ping
I am redirecting my ping output to a file. The sample output is like this:

64 bytes from xx.xx.xx.167: icmp_seq=4490 ttl=116 3.75 ms 2011Jul12- 15 40 16
64 bytes from xx.xx.xx.167: icmp_seq=4491...
4,667
Posted By zorrox
Your first codes seem to be very advance to a...
Your first codes seem to be very advance to a newbie like me. but thank you radoulov. it works. Can you explain your codes:
awk 'BEGIN {
while ((getline < "file1") > 0) {
split(ARGV[ ++c ],...
4,667
Posted By zorrox
Thank you to both of you. I am going to test it...
Thank you to both of you. I am going to test it it just that I just realized that my pdf files order is all wrong. The files order is like this when I run ls:
filex-1.pdf
filex-11.pdf
filex-2.pdf...
4,667
Posted By zorrox
awk print variable
I have list of files:

ls
a.pdf
b.pdf
c.pdf

and so on...

and I have a file like this:

cat file1
apple
mango
pear

and so on...

I want to rename my file like this:
2,121
Posted By zorrox
Your code is long ygemici. Thanks. ...
Your code is long ygemici. Thanks.

---------- Post updated at 08:57 AM ---------- Previous update was at 08:47 AM ----------

Thank you Mr Ahamed. Your code is much better.
1,806
Posted By zorrox
Thanks mirni. Your code works very well. You the...
Thanks mirni. Your code works very well. You the best.
1,806
Posted By zorrox
sed delete option
I have tried doing this to delete some lines: sed '1,10d' file
Now I want to specify a variable as a line number for example:

lastline=wc -l file
linestart=$lastline - 20

sed...
Showing results 1 to 25 of 35

 
All times are GMT -4. The time now is 08:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy