10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this script to parse some logs:
#!/bin/bash
id=$1
shift
sed "/(id=$id)/,/^$/!d" "$@"
Usage: ./script.sh 1234 logfile
The logs have an empty line before the logged events/timestamps -- most of the time. And this is my issue, since when there is no empty line, it will catch things... (4 Replies)
Discussion started by: KidCactus
4 Replies
2. Shell Programming and Scripting
Hi all, thanks for reading the post.
I'm trying to parse hundreds of log files in a directory. One log file looks similar to below:
Investigator : Jim_Foo
Custodian : Jim_Foo-HDD1-FOO-1234
Export Path : N:\FOO-1234\Foo_Foo
Compute MD5 : No
File List Only: No
Extensions Selected:... (4 Replies)
Discussion started by: chipperuga
4 Replies
3. Shell Programming and Scripting
Hi everyone,
another question while using sed.
my sed statement should parse every line in a file and store all "i" variable item a a new file.
any wrong arguments here?
Thanks a million.
task_name => name,
object_type => 'TABLE',
attr1 => 'TestR3',
attr2 => '$i',
for i... (4 Replies)
Discussion started by: sundaygeek
4 Replies
4. Shell Programming and Scripting
Hi folks,
I have XML files with the following sections (section occurs once per file) in them:
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
<LastName>Bernal</LastName>
<ForeName>Federico</ForeName>
... (3 Replies)
Discussion started by: euval
3 Replies
5. Shell Programming and Scripting
Hello,
I have a html file like this :
<html>
...
...
...
<table>
.......
......
</table>
<table name = "hi">
......
.....
...
</table>
<h1> Welcome </h1>
.......
......
</html> (11 Replies)
Discussion started by: prasanna1157
11 Replies
6. Shell Programming and Scripting
I am just beginning with sed and awk and understand that they are "per" line input. That is, they operate on each line individually, and output based on rules, etc.
But I have multi-line text blocks that looks as follows, and wish to ONLY extract the text between the first hyphen (-) and the... (13 Replies)
Discussion started by: bulgin
13 Replies
7. Shell Programming and Scripting
I have a tmp.xml file like:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Ip>193.143.121.198</Ip>
<Status>OK</Status>
<CountryCode>PL</CountryCode>
<CountryName>Poland</CountryName>
<RegionCode>82</RegionCode>
<RegionName>Pomorskie</RegionName>
<City>Gdansk</City>
... (9 Replies)
Discussion started by: unclecameron
9 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to replace paths with \ (as in NT) with / (as in Unix) in a script using sed. Following is the command I use:
sed "s/e:\Kenny_test\csv_files/var/opt/ciw/data/outbound/g" EMEA4710.SQL > test
the string to replace is e:\Kenny_test\csv_files
the target string needs to... (3 Replies)
Discussion started by: Abhidey
3 Replies
9. Shell Programming and Scripting
Hi,
I am wondering if there's a simpler way to extract the second occurrence of a word enclosed in that matches my search criteria.
Sample Input is as follows:
Error installing feature - com.er.nms.cif.ist.NoMatchingUpgra
Error installing feature -... (4 Replies)
Discussion started by: racbern
4 Replies
10. Shell Programming and Scripting
Hello All,
I am new to using sed, and I need to extract from the string data after : delimeter.
Can you help me please with the sed command?
Here's the input:
ipAddress: 10.20.10.11
ioIpAddressNodeB: 10.20.10.10
ioIpAddressNodeA: 10.20.10.9
ipAddress: 0.0.0.0
Expected Output:... (7 Replies)
Discussion started by: racbern
7 Replies