10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have one question in shell script for escape "\" with command substitution "` `". I post there to seek help to understand how it works.
My original one piece of code in script like this: This piece of code in whole script is working without errors
chk_mode=`sqlplus -s /nolog<<EOF
connect /... (4 Replies)
Discussion started by: duke0001
4 Replies
2. Shell Programming and Scripting
I have script data.sh which has following error.
Script Name : data.sh
#!/bin/sh
infile=$1
len=${#infile}
echo $len
texfile=${infile:0:$len-4}
echo $texfile
run command
./data.sh acb.xml
I get following error message: (5 Replies)
Discussion started by: man4ish
5 Replies
3. Shell Programming and Scripting
Hello,
I Have a file like this, with five columns:
B D F T L
---------
0 0 0 0 0
0 0 0 1 0
0 2 0 0 1
I need, for each row, to append another five columns similar to the first ones, but with the field labeled as "T" (4th field of the column) substituted in this way:
(16 * value of... (3 Replies)
Discussion started by: PapaJustify
3 Replies
4. Shell Programming and Scripting
Hi All,
I'm trying to run a similar script to copy a files from one location to another.
#!/bin/bash
source="/home/pradeepk/a.txt"
destination="/home/pradeepk/dir1"
cp $source $destinationi'm getting following error.
cp: cannot stat `/home/pradeepk/a.txt\r': No such file or directorywhen... (1 Reply)
Discussion started by: pradeep2002gs
1 Replies
5. UNIX for Dummies Questions & Answers
Hello!!
Am trying to substitute the value of a shell variable with the value of another shell variable. The values are obtained into the shell variables through some other processing.
for ex.
i've used the follow sed command..
sed "s/$var1/$var2/g"
i've also tried the other... (5 Replies)
Discussion started by: a_ba
5 Replies
6. Shell Programming and Scripting
Hi guys, I'm looking for some thoughts on this. I'm trying to do a clean 1 liner to substitute some values. What I have:
sed 's/Personid=.*/Personid=xxxxxx/' $tmpFileOut
sed 's/Person:.*/Person:xxxxxx/' $tmpFileOut
sed 's/PersonID:.*/PersonID: xxxxxx/' $tmpFileOut
Obviously that's a bit... (1 Reply)
Discussion started by: rich@ardz
1 Replies
7. Shell Programming and Scripting
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies
8. Solaris
Hi,
I have to read a file and translate the contents including substituting the variables if any and write to another file without using sed or awk.
For ex:-
inputfile.txt
-----------
servername=$SERVER
application=$APPL
outputfile.txt
------------
servername=actual server name... (2 Replies)
Discussion started by: axes
2 Replies
9. UNIX for Advanced & Expert Users
My specific goal: automatically edit a Makefile variable's (EXTRAVERSION)
value in a kernel Makefile.
So, I have a shell script that takes one parameter, a version string:
buildkernel.sh 2.6.18.21.7-custom
In the script, I assign the parameter to K_VER:
K_VER="2.6.18.21.7-custom"... (2 Replies)
Discussion started by: duderonomy
2 Replies
10. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies