Search Results

Search: Posts Made By: ejianu
3,921
Posted By RudiC
How about outfile=${outfile%_v2}? man...
How about
outfile=${outfile%_v2}?

man bash: "Parameter Expansion" is a good reading for this...
3,921
Posted By RudiC
There might be a # missing - try ...
There might be a # missing - try
outfile="${infile%%/save*}${infile#*save}"
3,921
Posted By bakunin
There are several problems with this: first, the...
There are several problems with this: first, the "{}" placeholder for the found filename can only be used ONCE in a single -exec clause.

Second: you are calling poor sed for every file you find....
13,823
Posted By MadeInGermany
With sed echo "DBPATH=/some/path/database/db" |...
With sed
echo "DBPATH=/some/path/database/db" | sed 's#.*=##; s#/[^/]*$##'


---------- Post updated at 11:52 AM ---------- Previous update was at 11:31 AM ----------

With expr
expr...
13,823
Posted By RavinderSingh13
Hello ejianu, Please try following(sorry I...
Hello ejianu,

Please try following(sorry I didn't see you don't need db also).

echo "DBPATH=/some/path/database/db" | nawk '{sub(/.*=/,X,$0);match($0,/\/.*\//);print...
13,823
Posted By RavinderSingh13
Hello ejianu, On a Solaris/SunOS system,...
Hello ejianu,

On a Solaris/SunOS system, change awkto /usr/xpg4/bin/awk , /usr/xpg6/bin/awk, or nawk.

Thanks,
R. Singh
13,823
Posted By RavinderSingh13
Hello Ejianu, Following may help you in...
Hello Ejianu,

Following may help you in same.

echo "DBPATH=/some/path/database/db" | awk '{sub(/.*=/,X,$0);print}'


Thanks,
R. Singh
13,558
Posted By zaxxon
A different approach that I had prepared in case...
A different approach that I had prepared in case you show your doing 1st - nevertheless - maybe helpful too. Single steps; the test for 11 shouldn't be the problem:

# cat blafile
# set -A arrayA...
1,339
Posted By ygemici
change to this ;) sed -e ':a' -e...
change to this ;)
sed -e ':a' -e '$!N;s/\n/,/;ta'
Showing results 1 to 9 of 9

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