Search Results

Search: Posts Made By: LeNouveau
3,388
Posted By LeNouveau
I understood where was my mistake on the third...
I understood where was my mistake on the third example.
I did not understand what really happened. Thx.

And I did not realise there were so many actions for a simple pipe (which is not so...
3,388
Posted By LeNouveau
the command line "cat myFile.txt | ..." was only...
the command line "cat myFile.txt | ..." was only for an example and was present in my both tests, for an equality. ^^

For example, here the test 1 :
cat myFile.txt | grep -o "toto"And here the...
1,350
Posted By LeNouveau
Usually, when you put something between [], that...
Usually, when you put something between [], that means you're looking for one of the things inside. But if you insert "^" at the begining, that means you're looking something that is not inside.
It...
1,350
Posted By LeNouveau
Yes, the space is useful ^^ So, let's...
Yes, the space is useful ^^

So, let's explain what happens : sed -e "s/^<item> *\([^ ]*\) *<\/item>/\1/"

"s/blabla1/blabla2/" means we'll replace blabla1 by blabla2.
"^<item> *" means we want...
1,350
Posted By LeNouveau
Hi, Once you grepped the right line, you...
Hi,

Once you grepped the right line, you can use this :
... | sed -e "s/^<item> *\([^ ]*\) *<\/item>/\1/"
It will simply select everything between item tags, without spaces. So, it does not...
3,388
Posted By LeNouveau
How to use an input pipe ?
Hi all,

I would like to use properly an input pipe, like this :
cat myFile.txt | myCommand.shI always find this solution :
while read line; do ...; donebut I have a great lost of performance...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 05:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy