10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i have a json data that looks like this:
{
"ip": "16.66.35.10",
"hostname": "No Hostname",
"city": "Stepney",
"region": "England",
"country": "GB",
"loc": "51.57,-0.0333",
"org": "AS6871 British Telecommunications PLC",
"postal": "E1"
}
im looking for a way to assign... (9 Replies)
Discussion started by: SkySmart
9 Replies
2. Shell Programming and Scripting
Hello
I greped some lines from an xml file and generated a new file.
but some entries are missing my table is unsorted.
e.g.
NAME="Adel" ADDRESS="Donaustr." NUMBER="2" POSTCODE="33333"
NAME="Adel" ADDRESS="Donaustr." NUMBER="2" POSTCODE="33333"
NAME="Adel" NUMBER="2" POSTCODE="33333"... (5 Replies)
Discussion started by: witchblade
5 Replies
3. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
4. UNIX for Dummies Questions & Answers
Dear all,
Greetings.
I would like to ask for your help to extract lines with specific words in addition 2 lines before and after these lines by using awk or sed.
For example, the input file is:
1 ak1 abc1.0
1 ak2 abc1.0
1 ak3 abc1.0
1 ak4 abc1.0
1 ak5 abc1.1
1 ak6 abc1.1
1 ak7... (7 Replies)
Discussion started by: Amanda Low
7 Replies
5. Shell Programming and Scripting
I want to get a file together that lists router name and IP address of an interface together like so...
SOMERTR1A 10.10.10.20
SOMERTR1B 10.10.10.30
OTHRRTR1A 192.168.1.120
The file I'm trying to extract the text from looks like the below:
SOMERTR1A#show run int Lo0 | i add
... (5 Replies)
Discussion started by: branrobi
5 Replies
6. Shell Programming and Scripting
Hi,
I want to extract data b/w two words with the help of sed..
Eg: In "Anna said that she would fetch the bucket", I want to display data b/w "Anna" and "would"
O/P: said that she
I have tried with below code, but unable to get desired o/p
echo "Anna said that she would fetch the... (5 Replies)
Discussion started by: divya bandipotu
5 Replies
7. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
8. Shell Programming and Scripting
I hava a file with following data:
number|CREDIT_ID|NULL
date|SYS_CREATION_DATE|NULL
varchar2|GGS_COMMIT_CHAR|NULL
varchar2|GGS_OP_TYPE|NULL
number|GGS_SCN|NULL|
number|GGS_LOG_SEQ|NULL
number|GGS_LOG_POS|NULL
number|GGS_ORACREC_SCN|NULL
varchar2|BATCH_ID|NULL
char|GGS_IMAGE_TYPE|NULL
... (6 Replies)
Discussion started by: kolesunil
6 Replies
9. 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
10. Shell Programming and Scripting
How can I delete lines that contain 3 or more words?
I have a file, old.txt, that has multi-word phrases in it and I want to remove the lines with 3 words or more and send the output to new.txt.
I've tried the following using sed but it doesn't seem to work:
sed '/(\b\w+\b){3,}/d' old.txt >... (5 Replies)
Discussion started by: revax
5 Replies