10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Below code extracts multiple field values from XML into array and prints all in one line.
perl -nle '@r=/(?: jndiName| authDataAlias| value| minConnections| maxConnections| connectionTimeout| name)="(+)/g and print join ",",$ENV{tIPnSCOPE},$ENV{pr
ovider},$ENV{impClassName},@r' server.xml
... (4 Replies)
Discussion started by: kchinnam
4 Replies
2. Shell Programming and Scripting
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies
3. 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
4. Shell Programming and Scripting
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies
5. Shell Programming and Scripting
Hi All,
I need to serach and replace a strings between single quote in a file.
My file has :
location='/data1/test.log' and the output needed is
location='/data2/test_dir/test.log'
pls if anybody know this can be done in script sed or awk.
I have a script, but it's... (6 Replies)
Discussion started by: mnmonu
6 Replies
6. Shell Programming and Scripting
Hi There...
I need to serach and replace a strings in a text file.
My file has; books.amazon='Let me read' and the output needed is
books.amazon=NONFOUND
pls if anybody know this can be done in script sed or awk.. i have a list of different strings to be repced by NONFOUND.... (7 Replies)
Discussion started by: Hiano
7 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have variable inside shell script - from_item.
from_item = 40.1'1/16
i have to first find out whether FROM_ITEM contains single quote(').
If yes, then that need to be replace with two quotes ('').
How to do it inside shell script? Please note that inside shell script........ (4 Replies)
Discussion started by: yogichavan
4 Replies
8. Shell Programming and Scripting
Hi,
How do I replace the charachters = '*' to = '^' using Sed commands.
As I have several * in the script, thus I have to replace the single quotes too.
Please let me know any solution.
I have tried the escape character backslash '\' but it doesnt help.
sed "s/= \'*\'/=... (2 Replies)
Discussion started by: prachifun
2 Replies
9. Linux
Dear Experts
My source file contains the symbol cloud (☁).
How do i replace this ☁ symbol whose Unicode value is 2601 in linux file with single quotes ?
Any help will be much appreciated.
Many thanks (4 Replies)
Discussion started by: pklcnu
4 Replies
10. Shell Programming and Scripting
Hi,
I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file:
Name = "abc"
The regex I'm using to match the same is:
egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies