10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to manipulate one Database file on Solaris 11 in which contains more than 5000 lines of data file path like this:
'/data1/oradata/DBNAME/system01.dbf',
'/data7/oradata/DBNAME/undotbs1_01.dbf',
'/data1/oradata/DBNAME/sysaux01.dbf',
'/data28/oradata/DBNAME/userdata01.dbf',
... (6 Replies)
Discussion started by: duke0001
6 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to replace the variable in the file after the particular match string. It is being replaced if i hardcode the value and with use of "&" with sed.
sed -e "s/URL./& http:\\localhost:7223/g"
But when am trying to pass the variable it is failing. I tried multiple... (9 Replies)
Discussion started by: sharsour
9 Replies
3. Shell Programming and Scripting
Hi,
I have a file where I want to replace the 15th field separated by comma, only on specific lines matching lots of different conditions.
I have managed to read the file line by line, within the loop my line is held in a variable called $line
I assume this will be using sed (maybe... (5 Replies)
Discussion started by: jpt123
5 Replies
4. Shell Programming and Scripting
Hi
I use :
path=/var/www/admin
echo "$path" | sed -e 's/\//\\\//g'
this return
\/var\/www\/admin
and is ok.
but
path2=`echo "$path" | sed -e 's/\//\\\//g'`
echo $path2
return an error:
sed: -e expression #1, char 9: unknown option to `s'
Can anyone help me?
Thanks (3 Replies)
Discussion started by: georgian
3 Replies
5. Shell Programming and Scripting
Hi I'm trying to select text between two lines, I'm using sed to to this, but I need to pass variables to it. For example
start="BEGIN /home/mavkoup/data"
end="END"
sed -n -e '/${start}/,/${end}/g' doesn't work. I've tried double quotes as well. I think there's a problem with the / in the... (4 Replies)
Discussion started by: mavkoup
4 Replies
6. Shell Programming and Scripting
Hello All,
I'm trying to write a script that will perform a dynamic match (of a dynamic variable) and set a variable to have the resulting (match) value.
The idea is that the environment variable to check ($1) and the regular expression to use ($2) are given as parameters.
For example,... (5 Replies)
Discussion started by: aedgar
5 Replies
7. Shell Programming and Scripting
Hello there,
I have a bit of dirty delimited file, I mentioned dirty because, the delimiter can also appear in wrong positions. However, one uniqueness of this file is
whenever the delimiter appear inside the double quote, then do not consider as delimiter, if it appear outside double then... (8 Replies)
Discussion started by: brainyoung
8 Replies
8. Shell Programming and Scripting
Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
Discussion started by: alrinno
2 Replies
9. Shell Programming and Scripting
Hi
I want to replace ./testsed.ksh
with
testsed.ksh
./ is to be removed
scriptnm=`sed -e 's/\.///' $0
does not work
Please help (3 Replies)
Discussion started by: usshell
3 Replies
10. Shell Programming and Scripting
Hi All,
In ksh script i'm trying to assign "sqlstmt1" varaible value,
update VAREntryTb set VAR10num = VAR1num * Mltplr where BusD = '$val1' and RunI = 1"`
Hence i wrote below statement, the issue with this is shell is expanding "*" character adn thus subistuting it with the content of my... (6 Replies)
Discussion started by: arvindcgi
6 Replies