10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to select 2nd, 3rd columns if line has "key3" and print rest of the lines as is.
# This is my sample input
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some text
key1="val1" key2="val2" key3="val3" key4="val4"
some text some text
some text some... (3 Replies)
Discussion started by: kchinnam
3 Replies
2. Shell Programming and Scripting
I wrote a Bash script which checks to see if a text string exists on a web page and then sends me an email if it does (or does not e.g. "Out of stock"). I run it from my crontab, it's quite handy from time to time and I've been using it for a few years now.
The script uses wget to download an... (6 Replies)
Discussion started by: gencon
6 Replies
3. Shell Programming and Scripting
Hi
I need help to configure AWK to find a string based From/To filed
I have a table like this
0A00 - 0AFF Nuts
0B00 - 0BFF Bolt
If I have in a program a value like "0B22" I wold like to get "Bolt" in return.
List are in Hex
Still try to learn AWK :) (3 Replies)
Discussion started by: Jotne
3 Replies
4. Shell Programming and Scripting
Hi everyone I've two files..
The contents of file1 are as shown below
4
5
12
13
36
37
45
46
47
The contents of file2 are as shown below
21 hello
13 world (5 Replies)
Discussion started by: abk07
5 Replies
5. Shell Programming and Scripting
Hello:
I am new to shell script programming. Now I would like to select specific records block from a file. For example, current file "xyz.txt" is containing 1million records and want to select the block of records from line number 50000 to 100000 and save into a file. Can anyone suggest me how... (3 Replies)
Discussion started by: nvkuriseti
3 Replies
6. UNIX for Dummies Questions & Answers
Hello,
Can someone advise me how to select the text within the second bracket of a string in shell script?
For example, the input file:
some message (string A) some message (string B) some message (string C) some message (string D) some message (string E)
The number of bracket is random... (4 Replies)
Discussion started by: hanul
4 Replies
7. Shell Programming and Scripting
hi,
I want to print all the lines between the matching braces.
For example,the file contains like the below.
asdfsdf
fsdfsd
WO{
w1{
ada
... (3 Replies)
Discussion started by: Boopesh
3 Replies
8. Shell Programming and Scripting
Hi,I am new to shell scripting and i want to find the line numbers of matching braces.
The file contents are as follows
File XXX.dat
1 ( CLASS "FRUIT"
2 (TYPE "PERSISTENT")
3 (MESSAGE_TYPE "M")
4 (GET_REQRD "Y")
5 (SET_REQRD "Y")
6 )
7 ( CLASS... (3 Replies)
Discussion started by: Rajendra_1510
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am looking for a simple command to select text within a open bracket "("
and a matching close bracket ")" and output the within-bracket-text to a file.
This function is similar to the common vi select a range of text with "(" to ")"
but not sure how to run the same function in command... (4 Replies)
Discussion started by: cursive
4 Replies
10. Shell Programming and Scripting
Hi,
I have to always select last portion of a block identified by 2 fixed keywords
which repeats in a file for eg
START
....
...
END
START
....
...
END
START
....
...
END (9 Replies)
Discussion started by: misenkiser
9 Replies