Search Results

Search: Posts Made By: boaz733
1,162
Posted By boaz733
i actully managed to solve it with a loop: it...
i actully managed to solve it with a loop:
it might be ugly but it works.

#!/bin/bash
x=`wc -l < datafile`
while [ $x -ge 1 ]
do
sed -n '/starting/{:L;N; /close/bK; bL; :K;p;q}'...
1,162
Posted By boaz733
Print text between 2 strings for the entire file
hey guys,

for the following output:
starting
open
open
close
close
starting
close
starting
open
close
close
starting
open
open
close
open
1,303
Posted By boaz733
it's perfect - thanks!
it's perfect - thanks!
1,303
Posted By boaz733
Print text between 2 identical strings
hey,
i m having a hard time trying to print only the first occurrence between 2 idenicale strings.

for the following output:
please
help
me im a
noob
please
im a noob
help me
noob...
16,974
Posted By boaz733
the perl script worked perfectly, the sed script...
the perl script worked perfectly, the sed script replaced all the match, and not only the first occurrence.
16,974
Posted By boaz733
[Solved] Replace first occurrence after match
hey guys, i have been trying to work this thing out with sed with no luck :confused:
i m looking for a way to replace only the first occurrence after a match
for example :


Cat
Realized...
1,864
Posted By boaz733
Grep the contents of a file with another file
hey guys, i got a easy one - i think.
i got 2 files:
file a.txt:

111
222
333


file b.txt:

dave the killer
TXTFF FGGD 222
herry
FDSFG FDSFG 22
susan
RHRHER 466
google
FEEFF...
7,457
Posted By boaz733
grep a specific amount of occurrence
hey , i m trying to figure out how to do the following :

i got a text file the looks like so:



1031
1031
1031
1031
1031
1031
1031
1031
16500
16500
16500
16500
1031
1031
7,786
Posted By boaz733
grep a range of time & date
how can i grep a range?
i have a text file with the following text:

result.log.00:2012/01/02 12:00:07.422 LOG STARTED HERE
N6Kashya29MemoryShieldScheduler_AO_IMPLE, pid=8662/8658,...
5,596
Posted By boaz733
for loop (001 to 500)
hey,
how do i create a for loop that runs for i from 001 to 500 ?
i need that the zero prefix will remain so when i print "i" it will
look like so:


001
002
.
.
008
009
.
.
058...
1,494
Posted By boaz733
from bottom up
hey,
how can i do the same thing but only from the bottom ?

red
blue
house cat
stop:
my girl cheated on me
yellow
sun
going back homewill return

my girl cheated on me
yellow
sun...
1,494
Posted By boaz733
grep while different
hey,
i m trying to grep everything in a text file as long i dont stumble in a "stop:"
for example:

red
blue
house cat
my girl cheated on me
yellow
stop:
sun
going back homewill return...
1,880
Posted By boaz733
thank u , but i get the following: ...
thank u ,
but i get the following:

/tmp/Boaz> nawk 'BEGIN{FS=",";OFS=","}!/,$/{$NF=$NF-5")";print}/,$/{$(NF-1)=$(NF-1)-5")"; print}' test
/,: Event not found.
2,144
Posted By boaz733
add char o end of line if dosent exist
hey ,
i want to check if the char "#" exist at the end of every line of txt file
and if it dosent then add it for example:


the cat jumped on my mom #
cars can run on water#
i cant get a...
1,880
Posted By boaz733
my problem that some lines dosent have a "," at...
my problem that some lines dosent have a "," at the end of the line and
then it dosent work like here :...
3,019
Posted By boaz733
i
thank u for your reply
i use red hat i think it's the latest version
using perl ,sed, awk , bash or nl will be fine
and yes i do want ">=" included
3,019
Posted By boaz733
add a number to the beginning of every line
hey,

i would like to add a line number to the beginning like so:

red
blue
green
yellow
will be:

1=>red
2=>blue
3=>green
4=>yellowplease advise
thank u.
1,880
Posted By boaz733
awk a integer and replace it minus X
hey, i have a list of devices that looks like so:
...
2,066
Posted By boaz733
grep a range of text
hey,
i need to grep / awk a list of "DEV ID" range for example for greping
0936 - 09C1 from this file:

0x5000097310036d05 558 1 20531 LOCAL GLOBAL ...
24,929
Posted By boaz733
Script to select a file from a list
i m trying to write a script that will print all the txt files at /home/ directory
and will allow a selection of a file and then print the file name.

this is what i wrote so far:
echo "please...
1,233
Posted By boaz733
this works great! i was wondering if it's...
this works great!
i was wondering if it's possible to list all *.txt files in current folder and choose a file to use instead of "myWWNfile.txt" ?
like so:


Please select your wwn file:...
1,233
Posted By boaz733
Column to row - in order to create zones
i need a script that reads a wwn file like this:

LOCAL_HOST (before)

50:01:24:82:00:6c:a9:04
21:00:00:24:ff:30:35:7b
21:00:00:24:ff:30:35:70and will run over the file with all the wwn's in...
1,593
Posted By boaz733
Help With Backward grep
hey, i got 2 files with the following content:

file1:

LOCAL_GSK1
50:01:24:80:45:f1:15:23
50:01:24:81:45:f1:15:23
50:01:24:82:45:f1:15:23
50:01:24:83:45:f1:15:23
LOCAL_GSK2...
1,964
Posted By boaz733
thanx
thank u for that , i wanted to know if there is a way to run it only on exact match to "pwwn = 0x"
1,964
Posted By boaz733
Grep /Awk letters X - X in every line and print it as a mac address
hey
i m kinda new to this so i will appreciate any help
, i have this list of values:

pwwn = 0x50012482009cd7a7 nwwn=0x50012482009cd7a6 port_id = 0x280200
pwwn = 0x5001248201bcd7a7...
Showing results 1 to 25 of 25

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