Basically after \ I have new line i dont know why it is not been displayed in the web site.
I tried the code but the output was not same as new line was present
We don't know why you can't show us your input file either. I assume that by now you realize that you are making it very hard for us to help you.
Are you saying that this is what your input file looks like:
or perhaps,
or (what would seem more logical):
If I guessed correctly that one of the above three accurately describes what is in the input file you're going to feed into this shell script in the file named Book1.csv, which one is it? If it isn't one of these three and you can't accurately describe what your input file looks like, I don't see how we can help you.
And then, what string does your C program want as its operand? Should it be a string including the backslash character newline character pairs, or a string with the backslash character newline character pairs removed. Should there be a trailing newline character in that string, or not?
And finally, what does the output from your C program look like? Will it contain any comma, backslash, single quote, double quote, or newline characters. If the output contains a newline character, is it just one at the end of the output, or are there embedded newlines? If there are embedded newlines, are they all the second character in a backslash newline character pair?
Please help us help you; answer all of the above questions explicitly!
Below is my script that works fine and prints the desired output:
#!/bin/ksh
echo "$1" |
while IFS= read -r dirpath
do
echo "DIRR_PATH:$dirpath"
install_dir=$install_dir" "$dirpath
done
echo "Desired Output:$install_dir"
Output:
./loopissue.sh... (10 Replies)
We have a java stand alone application running currently on sun Solaris system. The java application runs on Jdk 1.4.
We are reshooting this java application to new Ibm servers.
There are 10 unix scripts for this application. All scripts works well except one shell script,
This shell... (2 Replies)
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
hi
i am trying to execute db2 queries through shell script. it's working fine but for few queries is not working ( those queries are taking time so the script is not waiting to get the complete the execution of that query )
could you please any one help me on this
is there any wait... (1 Reply)
Hi,
I'm trying to use the below command in a shell script, but couldn't.
The command is working fine when I'm executing from the dollar prompt i.e. shell.
Command:
grep -i fail /home/applmgr/error.log |egrep -i "`date --date="-4 day" +"%m/%d/%Y"`|`date --date="-4 day" +"%m/%d/%y"`"... (8 Replies)
I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through...
Script that i am using is below :
#!/bin/bash
sum=0
for i in $@
do
sum=$sum+$1
echo $sum
shift
done
I am executing the script as... (3 Replies)
Hi Gurus,
I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass.
The script has code as below.
ORACLE_SID=$1
DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON;
echo... (3 Replies)
Hello every one, i want to convert my shell script into a binary executable a .exe file , is it possible to do that if so are there any tools . Would the script take off when the arguments are parsed.
Thanks
Venu (13 Replies)
hi
i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script
example:
file name is test.vbs which contains
strSoundFile = "C:\windows\Media\Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand... (5 Replies)
Hi,
If not running a shell script file in current shell (. ./fileName) then $0 represents the executable file name. But in case of invoking shell script file in current shell then i m getting "$0 as -bash" . In such case how can i get the program name (running shell script file name)?
Thanks, (2 Replies)