Sponsored Content
Top Forums Shell Programming and Scripting Sed Question Can anyone please help? Post 302069310 by BCarlson on Friday 24th of March 2006 06:21:50 AM
Old 03-24-2006
Using sed

I believe single quotes can be done like this:

sed -e "s_'__g" file_in > file_out #(note: two underscores after ')


And double quotes can be done like this:

sed -e 's_"__g' file_in > file_out #(note: two underscores after ')
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sed Question

Hi, Is there any way to traverse the file once and look for the following conditions in one sweep instead of going over the file 3 times with different search criteria...... sed -n '/^ORA-07445/ p' /tmp/t$$ > ${OERRFILE} sed -n '/^ORA-00600/ p' /tmp/t$$ >> ${OERRFILE} ... (1 Reply)
Discussion started by: YS2002
1 Replies

2. Shell Programming and Scripting

sed question (again)

hello there, I have a sed question. I have a file (temp.srv), in it it has v1_host1 v2_host2 And I have another file (temp2.srv), in it is has v1_host3_date v1_host1 v2_host2 v2_host4_date v3_host5_date I had used a script to remove the name from temp2.srv base on the name inside... (3 Replies)
Discussion started by: ahtat99
3 Replies

3. Shell Programming and Scripting

sed question

Hi, When deleting lines using sed, as i understand the lines are redirected to the standard output. What i'm unclear about is how to actually modify the file? If I write the command sed '1,2d' test it will display lines one and 2 onto the screen however the file is not modified? I think my... (5 Replies)
Discussion started by: c19h28O2
5 Replies

4. Shell Programming and Scripting

sed question

Hi, :) can any body explain the following statement sed 's/\(\)- ]//g' cheers RRK (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

5. Shell Programming and Scripting

sed question

I have a file that conatins following info Policy1=U|guestRoom=test1idCode=5(1):!:Amenity2=U|RoomId=testrma=4(1):!:| GuestRoomAmenity1=U|guestRoomId=testguest1id^rmaCode=5(1):!:| I need it to look like this Policy1=U|guestRoom=test1idCode Amenity2=U|RoomId=testrmaCode... (2 Replies)
Discussion started by: arushunter
2 Replies

6. UNIX for Dummies Questions & Answers

sed question

How would I use sed to print everything on the line after the regular expresion? I have a configuration file setting several variables. cfg.dat DDB = cpptest SUDBNAME = sucpptestdb host = cpptest Example I want to search for the regular expresion 'SUDBNAME =' and print everything on... (3 Replies)
Discussion started by: orahi001
3 Replies

7. Shell Programming and Scripting

Sed Question 1. (Don't quite know how to use sed! Thanks)

Write a sed script to extract the year, rank, and stock for the most recent 10 years available in the file top10_mktval.csv, and output in the following format: ------------------------------ YEAR |RANK| STOCK ------------------------------ 2007 | 1 | Exxon... (1 Reply)
Discussion started by: beibeiatNY
1 Replies

8. Shell Programming and Scripting

sed question

hi i have a file with this line: variable=/export/home/oracle I want to change the file so that the path is replaced with the value of another variable var2=/tmp/anything. how to do this in sed? thx (4 Replies)
Discussion started by: melanie_pfefer
4 Replies

9. Shell Programming and Scripting

Sed question

I need to replace the numbers with a new string. How can I give a wildcard for the different # of numbers sed '/abcdef/s/abcdef=*/abcdef=999999/'<foo>foo1 From: To: abcdef=1234 abcdef=999999 abcdef=12345 abcdef=999999 abcdef=123456... (10 Replies)
Discussion started by: beppler
10 Replies

10. UNIX for Dummies Questions & Answers

SED question

I am trying to write a script that will take an input text file in the format person: place: phonenumber; person: place: phonenumber; person: place: phonenumber; ... and output it using sed too: Name ######## Location ######### Phone Number... (1 Reply)
Discussion started by: jmack56
1 Replies
std::linear_congruential< _UIntType, __a, __c, __m >(3cxx)				std::linear_congruential< _UIntType, __a, __c, __m >(3cxx)

NAME
std::linear_congruential< _UIntType, __a, __c, __m > - SYNOPSIS
Public Types typedef _UIntType result_type Public Member Functions linear_congruential (unsigned long __x0=1) template<class _Gen > linear_congruential (_Gen &__g) result_type max () const result_type min () const result_type operator() () void seed (unsigned long __s=1) template<class _Gen > void seed (_Gen &__g) Static Public Attributes static const _UIntType increment static const _UIntType modulus static const _UIntType multiplier Friends bool operator!= (const linear_congruential &__lhs, const linear_congruential &__rhs) template<class _UIntType1 , _UIntType1 __a1, _UIntType1 __c1, _UIntType1 __m1, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const linear_congruential< _UIntType1, __a1, __c1, __m1 > &__lcr)" bool operator== (const linear_congruential &__lhs, const linear_congruential &__rhs) template<class _UIntType1 , _UIntType1 __a1, _UIntType1 __c1, _UIntType1 __m1, typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, linear_congruential< _UIntType1, __a1, __c1, __m1 > &__lcr)" Detailed Description template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>class std::linear_congruential< _UIntType, __a, __c, __m > A model of a linear congruential random number generator. o A random number generator that produces pseudorandom numbers using the linear function $x_{i+1}tarrow(ax_{i} + c) d $. The template parameter _UIntType must be an unsigned integral type large enough to store values up to (__m-1). If the template parameter __m is 0, the modulus __m used is std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template parameters __a and __c must be less than __m. The size of the state is $ 1 $. Definition at line 346 of file tr1_impl/random. Member Typedef Documentation template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> typedef _UIntType std::linear_congruential< _UIntType, __a, __c, __m >::result_type The type of the generated random value. Definition at line 353 of file tr1_impl/random. Constructor &; Destructor Documentation template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> std::linear_congruential< _UIntType, __a, __c, __m >::linear_congruential (unsigned long__x0 = 1) [inline], [explicit] Constructs a linear_congruential random number generator engine with seed __s. The default seed value is 1. Parameters: __s The initial seed value. Definition at line 369 of file tr1_impl/random. References std::linear_congruential< _UIntType, __a, __c, __m >::seed(). template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> template<class _Gen > std::linear_congruential< _UIntType, __a, __c, __m >::linear_congruential (_Gen &__g) [inline] Constructs a linear_congruential random number generator engine seeded from the generator function __g. Parameters: __g The seed generator function. Definition at line 379 of file tr1_impl/random. References std::linear_congruential< _UIntType, __a, __c, __m >::seed(). Member Function Documentation template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> result_type std::linear_congruential< _UIntType, __a, __c, __m >::max () const [inline] Gets the largest possible value in the output range. Definition at line 416 of file tr1_impl/random. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> result_type std::linear_congruential< _UIntType, __a, __c, __m >::min () const [inline] Gets the smallest possible value in the output range. The minimum depends on the __c parameter: if it is zero, the minimum generated must be > 0, otherwise 0 is allowed. Definition at line 409 of file tr1_impl/random. template<class _UIntType , _UIntType __a, _UIntType __c, _UIntType __m> linear_congruential< _UIntType, __a, __c, __m >::result_type std::linear_congruential< _UIntType, __a, __c, __m >::operator() () Gets the next random number in the sequence. Gets the next generated value in sequence. Definition at line 130 of file random.tcc. template<class _UIntType , _UIntType __a, _UIntType __c, _UIntType __m> void std::linear_congruential< _UIntType, __a, __c, __m >::seed (unsigned long__x0 = 1) Reseeds the linear_congruential random number generator engine sequence to the seed __s. Parameters: __s The new seed. Seeds the LCR with integral value __x0, adjusted so that the ring identity is never a member of the convergence set. Definition at line 98 of file random.tcc. Referenced by std::linear_congruential< _UIntType, __a, __c, __m >::linear_congruential(). template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> template<class _Gen > void std::linear_congruential< _UIntType, __a, __c, __m >::seed (_Gen &__g) [inline] Reseeds the linear_congruential random number generator engine sequence using values from the generator function __g. Parameters: __g the seed generator function. Definition at line 399 of file tr1_impl/random. References std::linear_congruential< _UIntType, __a, __c, __m >::seed(). Referenced by std::linear_congruential< _UIntType, __a, __c, __m >::seed(). Friends And Related Function Documentation template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> bool operator!= (const linear_congruential< _UIntType, __a, __c, __m > &__lhs, const linear_congruential< _UIntType, __a, __c, __m > &__rhs) [friend] Compares two linear congruential random number generator objects of the same type for inequality. Parameters: __lhs A linear congruential random number generator object. __rhs Another linear congruential random number generator obj. Returns: true if the two objects are not equal, false otherwise. Definition at line 449 of file tr1_impl/random. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> template<class _UIntType1 , _UIntType1 __a1, _UIntType1 __c1, _UIntType1 __m1, typename _CharT , typename _Traits > std::basic_ostream<_CharT, _Traits>& operator<< (std::basic_ostream< _CharT, _Traits > &__os, const linear_congruential< _UIntType1, __a1, __c1, __m1 > &__lcr) [friend] Writes the textual representation of the state x(i) of x to __os. Parameters: __os The output stream. __lcr A % linear_congruential random number generator. Returns: __os. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> bool operator== (const linear_congruential< _UIntType, __a, __c, __m > &__lhs, const linear_congruential< _UIntType, __a, __c, __m > &__rhs) [friend] Compares two linear congruential random number generator objects of the same type for equality. Parameters: __lhs A linear congruential random number generator object. __rhs Another linear congruential random number generator obj. Returns: true if the two objects are equal, false otherwise. Definition at line 435 of file tr1_impl/random. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> template<class _UIntType1 , _UIntType1 __a1, _UIntType1 __c1, _UIntType1 __m1, typename _CharT , typename _Traits > std::basic_istream<_CharT, _Traits>& operator>> (std::basic_istream< _CharT, _Traits > &__is, linear_congruential< _UIntType1, __a1, __c1, __m1 > &__lcr) [friend] Sets the state of the engine by reading its textual representation from __is. The textual representation must have been previously written using an output stream whose imbued locale and whose type's template specialization arguments _CharT and _Traits were the same as those of __is. Parameters: __is The input stream. __lcr A % linear_congruential random number generator. Returns: __is. Member Data Documentation template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> const _UIntType std::linear_congruential< _UIntType, __a, __c, __m >::increment [static] An increment. Definition at line 358 of file tr1_impl/random. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> const _UIntType std::linear_congruential< _UIntType, __a, __c, __m >::modulus [static] The modulus. Definition at line 360 of file tr1_impl/random. template<class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m> const _UIntType std::linear_congruential< _UIntType, __a, __c, __m >::multiplier [static] The multiplier. Definition at line 356 of file tr1_impl/random. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Thu Aug 2 2012 std::linear_congruential< _UIntType, __a, __c, __m >(3cxx)
All times are GMT -4. The time now is 03:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy