10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi got this issue and was wondering if someone could please help out ?
var='." "'
echo $var
." "
I 'll get ." " and not ." with 10 spaces in between "
Thanks (3 Replies)
Discussion started by: stinkefisch
3 Replies
2. UNIX for Beginners Questions & Answers
I need to replace consecutive double quotes in a csv file, the data in the file is enclosed in double quotes but there are some places where the quotes are repeating
Example is below
Incoming data is :
"Pacific Region"|"PNG"|"Jimmy""|""|
Need output as:
"Pacific... (10 Replies)
Discussion started by: abhilashnair
10 Replies
3. Shell Programming and Scripting
I've a pipe delimited data in a file of size 3GB. if the text data conatins pipe delimiter that will be enclose with double quotes. I have to replace delimiter which exists between double quotes with #%@#%@#%@ using awk or sed. can some one provide a better and efficient solution to me.
The below... (4 Replies)
Discussion started by: BrahmaNaiduA
4 Replies
4. UNIX for Dummies Questions & Answers
I've got a sed shell script I've been using for quite a while to do batch find/replace operations on .xml files containing various types of text entries. This is the script I use:
#!/bin/bash
while read text_old text_new; do
sed_script+="s/$text_old/$text_new/g;"
done < trans_old_to_new... (9 Replies)
Discussion started by: Agreppa
9 Replies
5. Shell Programming and Scripting
Hi All,
I have been trying to replace a string using the sed command
string value contain blackslash and double quotes. I am not a expert writer of unix script but do try not to ask question. I have almost given up. Hope you all can give me some suggestion
I want to replace a place string... (6 Replies)
Discussion started by: thanush9sep
6 Replies
6. Shell Programming and Scripting
Hi Friends,
I looked up online, but couldn't figure out a proper solution.
I have an input file where the columns are separated by multiple spaces and the column content is separated by single space.
For example,
Chr1 hello world unix is fun
In the above example, chr1 is first... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
7. Shell Programming and Scripting
Hi
I have written a shell script which used sed code below
sed -i 's/'"$Pattern"'/ /g' $FileName
I want to count the length of Pattern and replace it with equal number of spaces in the FileName.
I have used $(#pattern) to get the length but could not understand how to replace... (8 Replies)
Discussion started by: rakeshkumar
8 Replies
8. Shell Programming and Scripting
Hello experts,
I need to validate a csv file which contains data like this:
Sample.csv
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
"ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0
I just need to check if all the records contain exactly the number of... (5 Replies)
Discussion started by: shell_boy23
5 Replies
9. Shell Programming and Scripting
In bash or perl, I would like to know how to substitute a null character (0x00) for every white space without changing the white spaces inside the block of double quotes and the white space immediately following a backslash.
Suppose that sample.txt consists of the following line.
"b 1" c\ 2
... (2 Replies)
Discussion started by: LessNux
2 Replies
10. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies