10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please use code tags
Hi,
I have input data is below format and n of column in the multiple flat files. the string data has any double quotes(") values replaced to double double quotes for all the columns{"").
Also, my input flat file each column string data has carriage of new line too.... (14 Replies)
Discussion started by: SSrini
14 Replies
2. Programming
Hi All,
I want to replace the commas which are not inside parenthesis,quotes
if input is
abc,,lm,(no,pq,rs),{tu,vw,xy},zs,"as,as,fr",'ab,cd,ef'
output should be
abc lm (no,pq,rs) {tu,vw,xy} zs "as,as,fr" 'ab,cd,ef'
I tried this str.replaceAll("\\(.*?\\)|(,)", " "); say my string... (3 Replies)
Discussion started by: preethy
3 Replies
3. Shell Programming and Scripting
i try to find way to make string concatenation in csh ( sorry this is what i have )
so i found out i can't do :
set string_buff = ""
foreach line("`cat $source_dir/$f`")
$string_buff = string_buff $line
end
how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies
4. Shell Programming and Scripting
Hi,
I have an input file like this
$ cat infile
hi,i,"am , sam", y
hello ,good, morning
abcd, " ef, gh " ,ij
no, "good,morning", yes, "good , afternoon"
from this file I have to split the fields on basis of comma"," however, I the data present inside double qoutes should be treated as... (3 Replies)
Discussion started by: sam05121988
3 Replies
5. Shell Programming and Scripting
I have a script which outputs some timing data a line at a time. There are approx. 10 lines echoed, each line looks something like this:
0.741 http://checkip.dyndns.org 94.170.119.226Since I needed to add all the values in the first column, I piped the output to grep, matching and printing the... (7 Replies)
Discussion started by: gencon
7 Replies
6. Shell Programming and Scripting
Hi all,
My code reads:
foldername=$(basename $PWD)
myvar=$(rm -v `ls | grep -vE 'file1|file2|$foldername.ext'` | wc -l)
echo "Removed $myvar files"
The thing is $foldername won't pick the value stored in 'foldername'. My guess is that the single-quotes are making it read $foldername... (2 Replies)
Discussion started by: Aquila
2 Replies
7. Shell Programming and Scripting
Hi Experts,
How to ignore any delimiters which is inside the quotes. in awk script.
I am having script which counts number of delimiters from the line now i need count delimiters only separators .
`grep "14" | cut -d"=" -f2` -F'~'if (NF-1 != v1) '
this command counts number of Tilde... (7 Replies)
Discussion started by: Ganesh Khandare
7 Replies
8. Shell Programming and Scripting
Hi
I have the following assignment in my ksh script:
PX_LIST="4119 2390 2294 2776 2897 4099"
Is there any sed/awk command which would allow the to remove certain number from this string. Let's say I need to remove PX=2390 from PX_LIST, so the output after deletion will be"
PX_LIST="4119 2294... (5 Replies)
Discussion started by: aoussenko
5 Replies
9. Shell Programming and Scripting
I have a csv file with lines like the followings
123456,"ABC CO., LTD","XXX"
789012,"DEF LIMITED", "XXX"
before I bcp this file to database, the comma in "CO.," need to be removed first.
My script is cat <filename> | sed 's/"CO.,"/"CO."/g'
but it doesn't work. Can anyone here able to... (2 Replies)
Discussion started by: joanneho
2 Replies
10. Shell Programming and Scripting
I'm having a strange problem with escaping double-quotes. I have a script that looks like this:
#!/bin/bash
for HOST in `cat $INFILE | grep -v ^#`
do
for VFILER in `some_command`
do
echo " "
echo -e '\E
The problem with ssh command... (3 Replies)
Discussion started by: GKnight
3 Replies