Yeah now i get this... was searching for remove command :-)
But worked also with rem command like before and not having rem file...
So this is the final solution for me and works:
+thanks!
---------- Post updated at 05:26 PM ---------- Previous update was at 03:40 PM ----------
one more question regarding to the "cut delimiter" option.
man page tells me i can use multybyte delimiters, but i'm not able to...
example:
STRING.txt bla spam...
wished result:
STRING // so delimiter is .txt
I tried delimiter ".txt" - did not work
I tried delimiter "." - worked
so can anyone tell me how i can use more characters as delimiter? Also tried ' instead of "
thanks guys
& girls for sure
---------- Post updated 22nd Feb 2011 at 01:32 PM ---------- Previous update was 21st Feb 2011 at 05:26 PM ----------
Found it out...
cut -d " " -f2 // ensures to get colums seperated by spaces and chooese second
cut -d "." -f1,2 // seperate above through dots and use first and second column
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.
is there a way to speed things up?
Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Hi folks!
I'm trying to get a part of a text inside a text file (sudoers actually) but I'm having trouble.
Here is an example of a text:
Cmnd_Alias DUMMY = /bin/ls /bin/car /usr/bin/whatever
Cmnd_Alias TARGET = test test test test test \
... (6 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi,
I have two variables x and y.
i need to find a particular string in a file, a workflow name and then insert the values of x and y into the next lines of the workflow name.
basically it is like as below
wf_xxxxxx
$$a=
$$b=
$$c= figo
$$d=bentley
i need to grep the 'wf_xxxx' and then... (6 Replies)
Hello Everyone,
I just started scripting this week. I have no background in programming or scripting.
I'm working on a script to grep for a variable in a log file
Heres what the log file looks like. The x's are all random clutter
xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Hi,
At first I want to please you to provide the solution with grep/sed if possible. :cool:
File looks like:
wished result:
so I want in a new file
BLUE@@RED
string from first line like:
grep "/folder_start" cs_src > tmp1
string from second line:
grep "/main" cs_src... (14 Replies)
I'm new to using sed and grep commands, but have found them extremely useful. However I am having a hard time figuring this one out:
Delete every line containing the word CEN and the next line as well.
ie. test.txt
blue
324 CEN
green
red
blue
324 CEN
green
red
blue
to produce:... (2 Replies)
I know how to grep, copy and paste a string from a line. Now, what i want to do is to find a string and print a string from the line below it. To demonstrate:
Name 1: ABC Age: 3
Sex: Male
Name 2: DEF Age: 4
Sex: Male
Output:
3 Male
I know how to get "3". My biggest problem is to... (4 Replies)
Hi,
I'm trying to grep a string in a line using sed.
My original data looks like this:
MRTG$ grep -i "System" $file
<H1>Traffic Analysis for 15 -- sERITHC3602.t-mobile.co.uk</H1> <TABLE> <TR><TD>System:</TD> <TD>sERITHC3602 in </TD></TR> <TR><TD>Maintainer:</TD> <TD></TD></TR>... (4 Replies)