Search Results

Search: Posts Made By: Christoph Spohr
3,870
Posted By Christoph Spohr
O.k. awk -F, # make "," the new field...
O.k.

awk -F, # make "," the new field delimiter
'{gsub(/ */,"",$0); # the format of your data is not consistent
# -> delete all blanks
split($0,t,","); # split the...
2,043
Posted By Christoph Spohr
Hi, for a file like: ...
Hi,

for a file like:

Year,Make,Model,Extras
1997,Ford,E350,variables
2000,Mercury,Cougar,examples


This command:
awk -F, 'NR==FNR{for (i=1;i<=NF;i++)
...
4,911
Posted By Christoph Spohr
Ok, try: sed -n...
Ok, try:

sed -n "/\sstring\/one\s/,/Finished/{p}" file

Output:
This is string/one today
string/one_is_here
string/one_is_there
Finished with the list


HTH Chris
4,416
Posted By Christoph Spohr
Hi, if your string ...
Hi,

if your string

[rquote=123456&tid=1234567&author=othernick] This is message text that is being quoted

is saved in a file called "file". This:

sed...
14,896
Posted By Christoph Spohr
Hi, try: awk '{if ($4 > a[$1" "$2"...
Hi,

try:

awk '{if ($4 > a[$1" "$2" "$3])a[$1" "$2" "$3]=$4}END{for (i in a) print i, a[i]}' file

Output:

3333 4444 BBBB 0.7
1111 2222 AAAA 0.9


HTH Chris
4,780
Posted By Christoph Spohr
Hi, try: run=run egrep -e...
Hi,

try:


run=run
egrep -e "$run.*avg" file


HTH Chris
3,067
Posted By Christoph Spohr
Hi, do you mean something like this: ...
Hi,

do you mean something like this:

sed -n '/^\(pattern1\|pattern2\|pattern3\|pattern4\)/{N;N;p}' file

HTH Chris
4,282
Posted By Christoph Spohr
Try: eval $GREP ... For indirect...
Try:


eval $GREP ...


For indirect references you have to use eval.

HTH Chris
Showing results 1 to 8 of 8

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