Sponsored Content
Top Forums Shell Programming and Scripting sed not outputing variable into new file Post 302795523 by RudiC on Thursday 18th of April 2013 01:50:51 AM
Old 04-18-2013
You are telling us that (unquoted) $foo and $bar are being expanded, while (quoted) $SHOW is not.
Is the mkdir one line above working correctly, then?
Why don't you post an execution log with the -x option set?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

outputing sed to a variable

Hello, My appologies for asking a very basic question but... In a shell, I enter: echo tit | sed -e s/tit/tat/g This returns: tat as expected. But when I enter: set test = `echo tit | sed -e s/tit/tat/g` echo $test This returns an empty line. Why is this so and how... (3 Replies)
Discussion started by: flewis
3 Replies

2. Shell Programming and Scripting

sed -i '7 c\$variable' file ....(?!@#$%^&*!)

I have tried everything I can think of to get sed to change line N of a file to the contents of a variable. I have Googled the Internet, and I find lots of people telling how to use variables with the "Substitute" command, but no one telling how to use variables with the "Change" command. I... (4 Replies)
Discussion started by: Mr.Lauren
4 Replies

3. Shell Programming and Scripting

Having sed to read lines of a file with the use of a variable..Possible?

This i will print the second line of a file sed -n '2p' test2 The use of a variable is impossible here. a=1 while ; do line=`sed -n '$a p' test2` # do some things here with the line variable a=`expr $a + 1` done But the uotput of sed command is 'p'..... What can i do to use a variable... (2 Replies)
Discussion started by: hakermania
2 Replies

4. Shell Programming and Scripting

using file-and-replace sed command with the use of a variable?

Ok, so, let's say I have the variable $GMAILID....How can I use it with sed command so to replace a string in a file? e.g.: sed -i 's/$GMAILID/test@gmail.com/' /home/$USER/Desktop/sendmail (4 Replies)
Discussion started by: hakermania
4 Replies

5. Red Hat

How to pass value of pwd as variable in SED to replace variable in a script file

Hi all, Hereby wish to have your advise for below: Main concept is I intend to get current directory of my script file. This script file will be copied to /etc/init.d. A string in this copy will be replaced with current directory value. Below is original script file: ... (6 Replies)
Discussion started by: cielle
6 Replies

6. Shell Programming and Scripting

How to replace a string with a variable in a file using sed?

I have a file having some text like: PATH_ABC=/user/myLocation I have to replace "/user/myLocation" with a session variable say, $REPLACE_PATH, where $REPLACE_PATH=/user/myReplaceLocation The following sed command is not working. It is writing PATH_ABC=$REPLACE_PATH in the file ... (2 Replies)
Discussion started by: SKhan
2 Replies

7. Shell Programming and Scripting

sed replacement in file when line is in a variable

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

8. Shell Programming and Scripting

sed and variable as target file

for file in `ls /tmp/*_sw_list`; do /usr/bin/sed -i '' '1,/^Software\ Update/d' $file done In my script, this doesn't work. I can copy-and-paste it, and it works. Enabling debugging shows it is resolving the file name correctly... it isn't an issue with special characters in the filename. ... (3 Replies)
Discussion started by: jnojr
3 Replies

9. Shell Programming and Scripting

Using echo, grep and wc and outputing to text file

My current line command is as follows: echo -n "text: " ; grep "blah text" ../dir1/filename | wc -l The output to the screen is as needed, but how do I print to a text file? (9 Replies)
Discussion started by: ncwxpanther
9 Replies

10. UNIX for Beginners Questions & Answers

Awk/sed to replace variable in file

Hi All I have one file with multiple lines in it, each line has static text and some variable enclosed in <<filename>> as well. e.g. as below 123, <<file1.txt>> this is my name, I stay at <<city.txt>> Thanks for visiting 348384y, this is my name <<fileabc.txt>>, I stay at near the mall of... (8 Replies)
Discussion started by: reldb
8 Replies
RMEVENTC(1)															       RMEVENTC(1)

NAME
rmeventc - destroy a CORBA EventChannel SYNOPSIS
rmeventc [-n channel-name] [-h] [-ORBparameter value] [channel-uri] DESCRIPTION
rmeventc connects to an event channel and calls its destroy() operation. If the channel is located by the -n option, then the name is un- bound (removed) from the Name Service. Example: rmeventc -nfoo/bar/baz.qux OPTIONS
-n channel-name The CORBA Name Service name used to look up the EventChannel CORBA object. Format for channel-name: [CONTEXT-ID[.CONTEXT-KIND]/]*OBJECT-ID[.OBJECT-KIND] Examples: foo, foo.bar, foo.bar/baz/qux, foo/bar/baz.qux. The default is EventChannel -h Display a short summary of command-line options. -ORBparameter value Standard omniORB options. see omniORB documentation for details. This option is commonly used to set the omniORB traceLevel, in or- der to get more detailed output. Example: -ORBtraceLevel 5 ENVIRONMENT VARIABLES
OMNIORB_CONFIG The location of the omniORB configuration file. COPYRIGHT
Copyright (C) 2003-2005 Alex Tingle. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. RMEVENTC(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy