10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I have a .csv file and when opened in notepad looks like this
gggg,nnnn,"last,first","llll""",nnn
So, Here I would like the ouput as below
gggg,nnnn,"last,first","llll",nnn
i.e replace all two double quotes into one. How could I do that?
This file is being processed by another... (5 Replies)
Discussion started by: dnat
5 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 was wondering how I would go around to do this.
This is an example of my output
Sun Aug 21 2016 03:00:00, BLAH
Mon Aug 22 2016 03:54:00, BLAH
Tue Aug 23 2016 04:22:11, BLAH
Thu Aug 25 2016 05:00:00, BLAH
Now what I would like to do is only count CONSECUTIVE days so in the... (1 Reply)
Discussion started by: rodriguesm
1 Replies
4. UNIX for Dummies Questions & Answers
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
Discussion started by: INNSAV1
7 Replies
5. Shell Programming and Scripting
Hi Guys,
I'm a newb at shell scripting and successfully attempted a small disk space script (victory!!) but i'm wondering whether it actually takes into consideration KB,MB,GB. Please take a look at the script and advise.
##script to check if file sys has reached threshold.
... (3 Replies)
Discussion started by: Irishboy24
3 Replies
6. UNIX for Dummies Questions & Answers
our user creates a text file with a white space on the filename. this same file is transfered to unix via automation tool. i have a korn shell script that reads these files on a input directory and connects to oracle database to run the oracle procedures which will load the data from each of the... (2 Replies)
Discussion started by: wtolentino
2 Replies
7. Shell Programming and Scripting
Hi all,
I'm sure this is quite a simple problem, but i'm completely new to shell scripting, so bare with me. Having problems with the read command. Here's what I have:
read -rp "Command to execute: " the_command
...
...
echo "$the_command"
...
...
eval "$the_command"
Now, say, for... (8 Replies)
Discussion started by: Justin Alvarez
8 Replies
8. Shell Programming and Scripting
Hi ,
I am currently using the while loop in bash shell, as follows.
while read line
do
echo $line
done < file.txt
However, i want to use the while loop on file.txt, which will read the file with 4 lines of gap.
Ex- if file.txt is a file of 100 lines, then i want to use the loop such... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies
9. Shell Programming and Scripting
I'm reading from a file that is semi-colon delimited. One of the fields contains 2 spaces separating the first and last name (4th field in - "JOHN<space><space> DOE"):
e.g. TORONTO;ONTARIO;1 YONGE STREET;JOHN DOE;CANADA
When I read this record and either echo/print to screen or write to... (4 Replies)
Discussion started by: NinersFan
4 Replies
10. UNIX for Dummies Questions & Answers
I accidentally started a filename with a spce and I can not get rid of it. Any words of advice? (6 Replies)
Discussion started by: noobie_doo
6 Replies