10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: mohtashims
10 Replies
2. Shell Programming and Scripting
Hi all,
i am new to this forum, unix and shell scripting.
I would really appreciate if you all can help me here..
I have files coming in the below format
'filename20513'13May06:03:45
filename are characters..
like 'ABDDUT20513'13May06:03:45
i need it to be renamed as... (17 Replies)
Discussion started by: khman
17 Replies
3. Shell Programming and Scripting
I've tried various permutations of quoting this path in a shell script to no avail:
/Users/bernie/Pictures/camera/Bernie\'s\ iPhone/Camera\ Roll
Here are some of the quoting/escaped paths I've tried:
##SrcPath="/Users/bernie/Pictures/camera/Bernie's\ iPhone/Camera\ Roll"... (2 Replies)
Discussion started by: zBernie
2 Replies
4. Shell Programming and Scripting
Hi,
I'm trying to parse a text file which uses commas as field separators. Fields are double quoted, and may themselves contain commas, like this:
"1","John Smith","London","123"
"2","Mary Robertson","Horsham, Sussex","456"
This causes problems for the following command
cut -d","... (7 Replies)
Discussion started by: sven44
7 Replies
5. UNIX for Dummies Questions & Answers
I want to parse the lines and want to extract the double quoted numbers as:
"SQL3149N "72" rows were processed from the input file. "0" rows were
successfully inserted into the table. "0" rows were rejected."
and want the output in 3 variables like
a=72
b=0
c=0
thanks in advance
... (3 Replies)
Discussion started by: mahesh_191
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I used to count number of fields using following command head -1 <filename> | awk -F"," '{print NF}'
Now the scenario is the delimiter(comma) occurs inside one of the data field. How to ignore the comma inside data and consider only delimiter and count number of fields. The fields are... (1 Reply)
Discussion started by: ethanr100
1 Replies
7. Shell Programming and Scripting
Hello!
I wroted a little script that should check for new updates on a server and get them if any. The problem is, every time I run it with sh, I'm getting an "script: 20: Syntax error: Unterminated quoted string" error!
The problem is, there isn't any "unterminated quoted string" in my script:... (2 Replies)
Discussion started by: al0x
2 Replies
8. Shell Programming and Scripting
Hi All,
index=10.5
let "res = $index + 1.7"
echo "res = $res"
Can anybody explain what this piece of code does. (7 Replies)
Discussion started by: kinny
7 Replies
9. Shell Programming and Scripting
I'm working with a java-based monitoring tool (Solaris/x86) which can be configured to call a shell script when a particular event occurs. The java app sends a set of quoted strings as input to the shell script.
The problem I'm running into is that the shell script, when called by the java app,... (0 Replies)
Discussion started by: iron_horse
0 Replies
10. Shell Programming and Scripting
Hi All,
I have files:
1. abc.sql
'This is a sample file for testing'
This does not have quotations
this also does not have quotations.
and this 'has quotations'.
here I need to list the hard coded strings 'This is a sample file for testing' and
'has quotations'.
So i have... (13 Replies)
Discussion started by: kprattip
13 Replies