10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Discussion started by: pchang
32 Replies
2. UNIX for Dummies Questions & Answers
$ ABCel='abc@gmail.com'
$ XYZel='xyz@gmail.com'
$ MYel='my@yahoo.com'
$ echo $ABCel
abc@gmail.com
$ echo $XYZel
xyz@gmail.com
$ echo $MYel
my@yahoo.com
I tried 3 variations, but not getting the expected result:
$ for VAR in ABC XYZ; do echo -e "${VAR}el $MYel"; done
ABCel... (1 Reply)
Discussion started by: bagnoble
1 Replies
3. Shell Programming and Scripting
Hi,
I have data as
"01/22/97-"aaaaaaaaaaaaaaaaa""aaa""aabbbbbbbbcccccc""zbcd""dddddddddeeeeeeeeefffffff"
I want to remove only the Consequitive double quotes and not the one which occurs single.
My O/P must be ... (2 Replies)
Discussion started by: Bhuvaneswari
2 Replies
4. Shell Programming and Scripting
Hi,
I am generating html code using cshell, but i am having one problem while printing double quotes,
I need to write following code in file. where $var contains list of web address
<a href="$var">$var</a>
So i am using
echo "<a href="$var">$var</a>" > file.html
But with this " in... (4 Replies)
Discussion started by: sarbjit
4 Replies
5. Shell Programming and Scripting
#!/bin/bash
#set -x
MAX=255
FILE=$1.dns_list
#declare -a d_arr
if
then
echo "Usage: `basename $0` network"
echo " e.g.`basename $0` 1.1.1"
exit
fi
echo "Remove file $FILE..."
rm $FILE
for (( i = 1; i < $MAX; i++ ))
do
PARSE=$(host $1.${i})
... (3 Replies)
Discussion started by: flee
3 Replies
6. Shell Programming and Scripting
Hi,
What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution?
while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file
But,
while IFS='\n' read -r... (3 Replies)
Discussion started by: royalibrahim
3 Replies
7. Programming
This is the code and I'm wondering why line 14: a = ... and line 16: b = ... is wrong.
This is the first time I've tried to use this. Please help me.
#include <stdio.h>
#include <math.h>
// The link and how the double pow is used.
//
// http://www.nextdawn.nl/c-reference/pow.php
//... (2 Replies)
Discussion started by: pwanda
2 Replies
8. UNIX for Dummies Questions & Answers
In a file I want to globally change a "|" charater by a new line character.
I am using the command
1,$s/\|/??/g
Can anybody say what should I put in place of ?? in the above command? (3 Replies)
Discussion started by: uLearner
3 Replies
9. Shell Programming and Scripting
Hi
I have a variable whose value is like this
i=/test/test1/test2/myfile.cd.070505123457
i would like to have the value of myfile.cd stored into another variable
my attempt is
test=${i##*/} ;echo $test ##and i get
myfile.cd.070505123457
since what i wnat is myfile.cd i try this... (19 Replies)
Discussion started by: xiamin
19 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to substitute variable in sed using combination of name and var_$name:
name=Tom
var_$name=1
sed -n "${var_"$name"}"p < myfile
but it doesn't work, do you know what's wrong ?
Thanks (1 Reply)
Discussion started by: asal_email2
1 Replies