Sponsored Content
Top Forums Shell Programming and Scripting Problem with eval a generated and interpreted variable name and its value Post 302897902 by sea on Wednesday 16th of April 2014 06:24:49 PM
Old 04-16-2014
This worked, thank you Smilie

Code:
BOOKMARK=$HOME/.gtk-bookmarks
CONFIG=$HOME/.config/user-dirs.dirs
DEST=$HOME/gtk-bookmarks.txt
. $CONFIG
echo "cat <<EOF" >> /tmp/$$
# copy into /tmp/$$ removing backticks and () to prevent accidental/malicious execution of commands
tr -d '`()' < $BOOKMARK >> /tmp/$$
echo "EOF" >> /tmp/$$

. /tmp/$$ > $DEST

rm /tmp/$$
cat $DEST

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

eval a variable that has a .

Hi, Is there any way that I can eval the following - eval abc.csv=def.csv I am getting the - bash: command not found error. thanks. (3 Replies)
Discussion started by: ttshell
3 Replies

2. Shell Programming and Scripting

How to assign eval value as Variable..

Im facing problem in assigning value of eval array variable as normal variable.. x=0 eval DATA${x}="FJSVcpcu" x=`expr $x + 1` eval DATA${x}="FJSVcsr" if x=0, type -> eval echo \$DATA$x , its give me FJSVcpcu i want assign this value into an variable as variable=`eval echo... (3 Replies)
Discussion started by: neruppu
3 Replies

3. Shell Programming and Scripting

bin/sh eval variable assignment

Why can't I do this? eval "TEST=5;echo $TEST;"; THIS WORKS!! TEST=5;echo $TEST; (2 Replies)
Discussion started by: blasto333
2 Replies

4. Shell Programming and Scripting

Passing eval value to a variable

Hello, I have a script that does an scp to a server and then gets the number of process running on that server, the o/P should be stored in a variable for further processing eval `echo "ssh -q $Infa_user@$host 'csh -c $CMD '"` where CMD="ps -ef | grep -i ${INFA_REPO} | grep -v grep | wc... (2 Replies)
Discussion started by: amit1_x
2 Replies

5. Shell Programming and Scripting

Help with eval usage for string containing Environment Variable

Help !! First, Thanks in Advance Here is what I have I have an environment Variable, let's call it v_VALUE. v_VALUE="\$ORACLE_HOME/bin" Hence, the location is ORACLE_HOME is not evaluated. ORACLE_HOME happens to be /app/oracle/product/10.1.2 I need a method of returning the... (1 Reply)
Discussion started by: dhangliter
1 Replies

6. Shell Programming and Scripting

eval and variable assignment

Hi, i have an issue with eval and variable assignment. 1) i have a date value in a variable and that date is part of a filename, var1=20100331 file1=${var1}-D1-0092.xml.zip file2=${var2}-D2-0092.xml.zip file3=${var3}-D3-0092.xml.zip i am passing the above variables to a script via... (11 Replies)
Discussion started by: mohanpadamata
11 Replies

7. Shell Programming and Scripting

assignment to variable from eval command

Hi Gurus, I am having 2 parameters as below parm1=value1 parm2=parm1 I want to evaluate parm1 value using eval echo \$$parm2 and later i want to assign this value to other variable which i will be using in if statement like : if ]; then do this....... fi could you please suggest... (5 Replies)
Discussion started by: k_vikash
5 Replies

8. Shell Programming and Scripting

assign multiple rows value to a variable using eval

background : Solaris, ksh metresult="ooo > pp" ts=89 eval append_${ts}="$metresult" bash: pp: command not found I want to create a variable which has in a part of its name a dynamically-established number (stored in another variable) usually I do this with eval command. The problem I... (5 Replies)
Discussion started by: black_fender
5 Replies

9. Shell Programming and Scripting

'eval' used in variable assignment

pattern1=book { x=1 eval echo \$pattern$x } book (this is the output) But when I assign a variable to the output of the eval it doesn't work unless I prefix 2 times backslash before $ as shown below. { a=`eval echo \\$pattern$x` echo $a } book Why here twice "\" has to be... (3 Replies)
Discussion started by: ravisingh
3 Replies

10. Shell Programming and Scripting

Safe way to eval variable declarations?

Is there a safe way to evaluate variable declarations within a script whether they come from a .conf file, user input, or stdin? Example .conf file: server=ftp.xxxx.com port=21 user="$USER" # Hopefully allow this type of substitution domain="$DOMAIN" server="$(malicious... (4 Replies)
Discussion started by: Michael Stora
4 Replies
KDE4-CONFIG(1)							 KDE User's Manual						    KDE4-CONFIG(1)

NAME
kde4-config - Prints KDE installation paths SYNOPSIS
kde4-config [--expandvars] [--prefix] [--exec-prefix] [--libsuffix] [--localprefix] [--version] [--types] [--path type] [--userpath type] [--install type] DESCRIPTION
kde4-config is a command line program used to retrieve information about KDE installation or user paths. Use this program to determine where the various aspects of the KDE installation reside on your system. OPTIONS
--expandvars expand ${prefix} and ${exec_prefix} in output --prefix Compiled in prefix for KDE libraries --exec-prefix Compiled in exec_prefix for KDE libraries --libsuffix Compiled in library path suffix --localprefix Prefix in $HOME used to write files --version Compiled in version string for KDE libraries --types Print a list of all available KDE resource types --path type Search path for the specified type --userpath type User paths for the types: desktop|autostart|trash|document --install type Prefix to install resource files to EXAMPLES
Print the top-level KDE installation directory: % kde4-config --prefix Print a list of all resource types: % kde4-config --types Print the installed wallpaper path: % kde4-config --path wallpaper SEE ALSO
kdeoptions(7) BUGS
None known. AUTHOR
Stephan Kulow <coolo@kde.org>. K Desktop Environment 2007-09-28 KDE4-CONFIG(1)
All times are GMT -4. The time now is 05:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy