Search Results

Search: Posts Made By: jazzaddict
2,930
Posted By jazzaddict
thanks, but now I've another problem when: ...
thanks, but now I've another problem when:

contents in
$TEST
10.0.0.1
10.0.0.2
10.0.0.21
10.0.0.3
10.0.0.4

contents in
$CAPTURE
10.0.0.1
10.0.0.2
10.0.0.21
10.0.0.21 <-- duplicated...
2,930
Posted By jazzaddict
Appending sed output to variable
I want to append matched output and cat the results into an variable. but I've been running into problems. sed is printing result on to screen instead of appending the output to $CAPTURE. I'm...
9,648
Posted By jazzaddict
Thanks! You're the man!
Thanks! You're the man!
9,648
Posted By jazzaddict
hi! could you explain the differences between...
hi! could you explain the differences between /usr/bin/grep and /usr/xpg4/bin/grep? will there be any script portability issue?

and would it correct to map it this way?

#!/bin/sh...
9,648
Posted By jazzaddict
Matching exact string with blank space using grep
hi!

i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.



echo...
2,129
Posted By jazzaddict
i just can't figure out why.. it doesn't work...
i just can't figure out why.. it doesn't work when I place it in a loop.. :confused:
2,129
Posted By jazzaddict
`printf "$VAR" | sed 'N;s/\n/. /'` sorry,...
`printf "$VAR" | sed 'N;s/\n/. /'`


sorry, can't seem to get it to work



---------- Post updated at 10:14 AM ---------- Previous update was at 09:56 AM ----------






it's odd I...
2,129
Posted By jazzaddict
i meant ascending numbering e.g. input:...
i meant ascending numbering

e.g.

input:

10.0.0.1
10.0.0.2
10.0.0.3

output:
1. 10.0.0.1
2. 10.0.0.2
3. 10.0.0.3
2,129
Posted By jazzaddict
appending running numbers on a variable
hi guys,

would appreciate some help here. I need to append running numbers using sed onto a variable that contain a list of IP addresses. I'm basically stuck on the running number part. e.g.

1....
2,159
Posted By jazzaddict
This is my file now: 1 June 3 10:30:22...
This is my file now:

1 June 3 10:30:22 test 1
1 June 3 10:34:22 test 4
1 June 3 10:35:22 test 5
2 June 3 10:31:22 test 2
2 June 3 10:33:22 test 3

And this is my...
2,159
Posted By jazzaddict
Using uniq on log files
I have this log file which I need to count the number of repeated line and do some manipulation.


test.log:
June 3 03:33:38 test 1
June 3 10:31:22 test 2
June 3 10:32:22 test 2
June 3...
4,314
Posted By jazzaddict
thanks you for the detailed explanation about...
thanks you for the detailed explanation about "\|", after using egrep instead, everything works out fine :D
4,314
Posted By jazzaddict
grep -i 'dog\|cat' test.log works in the...
grep -i 'dog\|cat' test.log

works in the shell! but /usr/bin/grep -i 'dog\|cat' test.log doesn't

---------- Post updated at 11:03 PM ---------- Previous update was at 10:59 PM ----------
...
4,314
Posted By jazzaddict
Hi guys! Thanks for your help! I've made the...
Hi guys! Thanks for your help! I've made the following changes..funny thing is that grep still doesn't run

#!/bin/sh
TEST=test.log
GREP=/usr/bin/grep

eval "$GREP -i 'dog\|cat' ${TEST}"

And...
4,314
Posted By jazzaddict
Execution problem with grep script (2 variables)
#!\bin\sh
TEST=test.log
GREP=\usr\bin\grep

$GREP -i 'dog\|cat' ${TEST}

Why doesn't grep run at all?
1,817
Posted By jazzaddict
remove the "-n" from TAIL="/usr/bin/tail...
remove the "-n" from
TAIL="/usr/bin/tail -n"
1,817
Posted By jazzaddict
tail script gone wrong
Hi guys...

What am I doing wrong?

#!/bin/sh
LINES=1
FILE=test.log
TAIL="/usr/bin/tail -n"

$TAIL -${LINES} ${FILE}

Error:

./tail.sh
usage: tail [+/-[n][lbc][f]] [file]
tail...
Showing results 1 to 17 of 17

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