Search Results

Search: Posts Made By: eightball
4,205
Posted By eightball
hi thanks @all
hi thanks @all
4,205
Posted By eightball
sed search pattern and delete lines
Hello,

i have a question.


My problem is that i have a file like:


TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY


i want find for MICHAEL and want delete lines like this:


TEST
3,125
Posted By eightball
STDIN and STDOUT
Hallo,

i have a script like:

if [$1] ;then
echo "OK"

else
echo "ERROR $2 is missing"

fi;

if [$2];then
touch $2

fi;

if [$2];then
cat $1 | grep xy > $2
1,167
Posted By eightball
thx but i write a script too, but it doesnt work...
thx but i write a script too, but it doesnt work fine.

#!/bin/bash

touch $2

if [ -w "$2" ];then
echo "$2 can be opened and write."


else
echo "NO FILE OR RIGHTS TO...
1,167
Posted By eightball
Parameters/Args
Hello,

i have a problem. I must write a script, which wants 2 arguments.

for example:

./test.sh x.txt y.txtit must be write x.txt in y.txt

and when i give 1 or no argument like
...
2,072
Posted By eightball
sorry i mean /* */
sorry i mean /* */
2,072
Posted By eightball
Delete Comments
Hello i am back :D,

i have a prolem. I want to Delete the IPs which are in Comments.

Input

192.168.0.1
192.168.0.2
#192.168.0.3
#192.168.0.4 - when TAB or Space, delete too....
2,915
Posted By eightball
thx very helpful :D
thx very helpful :D
2,915
Posted By eightball
grep IP script
Hello,

I have a command and would like to make that as a script. How do I do that?

my command is:
grep -Eo [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.

and i want to have that like grepscript.sh x.txt...
1,382
Posted By eightball
thanks for your helps but my problem is an other,...
thanks for your helps but my problem is an other,

i have txt file like

asdasd
asdad
<h3> asdsad </h3>
asda
asd when i make that, sed -n <x.txt -e "/^<h3>/,/<^h3>/p"then this remove all...
1,382
Posted By eightball
Delete after Tag
Hello,

how can i delete after a tag with sed.

this:

<h3>adsas</h3>
asdsad
asdsad

to:
<h3>adsas</h3>

how can i delete all words after the </h3>????

Please use code tags...
2,051
Posted By eightball
thank you it was very helpful :D
thank you it was very helpful :D
2,051
Posted By eightball
Hello, thanks for the help, but all letters...
Hello,

thanks for the help, but all letters must be uppercased.
2,051
Posted By eightball
replace between tags
Hello,

how can i do,

this:

<h1> linux </h1>

to

<h1> LINUX </h1>

it must be capitalized but how can i do that with SED???

thanks for help
Showing results 1 to 14 of 14

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