Sponsored Content
Homework and Emergencies Homework & Coursework Questions Attributes value substitution with sed command Post 302951971 by RudiC on Wednesday 12th of August 2015 09:44:22 AM
Old 08-12-2015
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course)

Quote:
School Name:Jalpaiguri Govt Engg College
Professor:Swapan kr Sengupta
Course Number:CSE502
City and Country are missing...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Substitution using sed

I know we can substitute a string using sed but how? For example: sed 's/(old variable)/(new variable)/ details.dat Am I suppose to put $old variable or whatever? Because I tried many times, it didnt work by putting $old variable. Am I suppose to enclose it with "" or ''? Please help (3 Replies)
Discussion started by: Ohji
3 Replies

2. UNIX for Dummies Questions & Answers

sed substitution

Hi, I have a set of files containing strings like I.TEST1_TEST2 or B.ESSA_ESSB for example. Does somebody know how to substitute these strings whith the same name and an extension "_V1" (ie. I.TEST1_TEST2_V1) using sed command or else ? (3 Replies)
Discussion started by: jo_aze
3 Replies

3. Shell Programming and Scripting

Substitution using SED

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies

4. Shell Programming and Scripting

SED Substitution

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies

5. Shell Programming and Scripting

Help with sed/substitution!

I have file.txt 1 4 7 9 3 I want to replace the tabs with a space, but my code doesn't work. cat file.txt | sed 's/"\t"/ /g' > t.txt But file is still the same. Numbers seperated by tabs instead of spaces. Help? (2 Replies)
Discussion started by: Bandit390
2 Replies

6. Shell Programming and Scripting

sed substitution

Hi I am trying to do a text insertion in a text file at a particular line number in a shell script. However its not working. sed '122i\ > for j in \`echo $MyList\` ; do perl -pi -e\'s#01\/01\/2009#01\/01\/2011#\' $j ; done' $HOME/MyScript.ksh The Actual line to be inserted at line 122... (5 Replies)
Discussion started by: som.nitk
5 Replies

7. AIX

Single command to change the attributes of all luns presented to an AIX host

Hi, I would like to know if there is a command similar to scsimgr in HP-UX that can help me change the algorithm and reserve_policy attributes of all luns presented to an AIX host. Otherwise I would have to use, chdev -l hdiskX -a algorithm=round_robin reserve_policy=no_reserve in a... (1 Reply)
Discussion started by: kanna_geekworkz
1 Replies

8. UNIX for Dummies Questions & Answers

sed insert command and variable expansion/command substitution

I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename? #!/bin/bash filename=`echo $0` /usr/bin/sed '/#include/ { i\ the filename is `$filename` }' $1 exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies

9. Shell Programming and Scripting

sed substitution

Hi everyone, I need very simple sed command to change a parameter in a text file. I have a line in this text which is like set xx 0.5 A program reads this file and does some algebraic calculations. So to make a parameter scan I need to change the value of xx. I thought I can do... (7 Replies)
Discussion started by: hayreter
7 Replies

10. Shell Programming and Scripting

Attributes value substitution with sed command

Hi, I am trying to substitute an attributes value using sed command but it is only possible to substitute the value without space. input xml <BillingAddress11300000 Tag="11300000" SectionID="BLA" CustAddrName="CLAUDIA LUCIA DE ALMEIDA" CustAddrStreet="AV ENGENHEIRO RICHARD" CustAddrState="RJ"... (3 Replies)
Discussion started by: Bijayan Sarkar
3 Replies
IP::Country::MaxMind(3) 				User Contributed Perl Documentation				   IP::Country::MaxMind(3)

NAME
IP::Country::MaxMind - Look up country by IP Address SYNOPSIS
use IP::Country::MaxMind; my $gi = IP::Country::MaxMind->new(GEOIP_STANDARD); # look up IP address '65.15.30.247' # returns undef if country is unallocated, or not defined in our database my $cc1 = $gi->inet_atocc('65.15.30.247'); my $cc2 = $gi->inet_atocc('yahoo.com'); DESCRIPTION
This module adapts the Geo::IP module to use the same interface as the IP::Country modules; thus allowing users to easily switch between using the two underlying databases. DATABASE UPDATES
Free monthly updates to the database are available from http://www.maxmind.com/download/geoip/database/ If you require greater accuracy, MaxMind offers a Premium database on a paid subscription basis. The author of this module is in no way associated with MaxMind. CLASS METHODS
$gi = IP::Country::MaxMind->new( $flags ); Constructs a new IP::Country::MaxMind object with the default database located inside your system's datadir, typically /usr/local/share/GeoIP/GeoIP.dat. Flags can be set to either GEOIP_STANDARD, or for faster performance (at a cost of using more memory), GEOIP_MEMORY_CACHE. When using memory cache you can force a reload if the file is updated by setting GEOIP_CHECK_CACHE. $gi = IP::Country::MaxMind->open( $database_filename, $flags ); Constructs a new Geo::IP object with the database located at $database_filename. OBJECT METHODS
All object methods are designed to be used in an object-oriented fashion. $result = $object->foo_method($bar,$baz); Using the module in a procedural fashion (without the arrow syntax) won't work. $cc = $gi->inet_atocc(HOSTNAME) Takes a string giving the name of a host, and translates that to an two-letter country code. Takes arguments of both the 'rtfm.mit.edu' type and '18.181.0.24'. If the host name cannot be resolved, returns undef. If the resolved IP address is not contained within the database, returns undef. $cc = $gi->inet_ntocc(IP_ADDRESS) Takes a string (an opaque string as returned by Socket::inet_aton()) and translates it into a two-letter country code. If the IP address is not contained within the database, returns undef. $cc = $gi->db_time() Returns zero. For compatibility only. COPYRIGHT
Copyright (C) 2002,2003 Nigel Wetters Gourlay. All Rights Reserved. NO WARRANTY. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2006-04-06 IP::Country::MaxMind(3)
All times are GMT -4. The time now is 04:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy