10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm new to shell programming, and am having a problem in a (Korn) shell program, which boils down to this:
The program reads a record from an input file and then uses a series of
"cut" commands to break the record into parts and assign the parts to
variables. There are no delimiters in the... (2 Replies)
Discussion started by: joroca
2 Replies
2. Shell Programming and Scripting
Hi,
I am trying to code a unix function to calculate date difference between two date variables. I am stuck at a point where I am trying to convert hours into minutes. Below is the code I am doing.
function get_elapsed_time
{
export PROPS_FILE=temp.properties
export... (8 Replies)
Discussion started by: Nutan
8 Replies
3. Shell Programming and Scripting
Guys,
I have a script that should change one of the configuration Parameter in a http accelerator, this config change which will halt http traffic into device. So I have designed a script which should do these changes. But after executing this script, found that one of the input variable is not... (8 Replies)
Discussion started by: raghunsi
8 Replies
4. Shell Programming and Scripting
Hi All,
I have developed below script for FTP a file from unix machine to another machine.
ftpToABC ()
{
USER='xyz'
PASSWD='abc'
echo "open xx.yy.zbx.aaa
user $USER $PASSWD
binary
echo "put $1 abc.txt" >> /home/tmp/ftp.$$
echo "quit" >> /home/tmp/ftp.$$
ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies
5. Shell Programming and Scripting
cat test.sh
sudo mount -t vfat /dev/sda7 /media/Ddrive
If i double click the test.sh file and select run in terminal then the terminal prompts for password.
How can i avoid typing password?
Or if i double click test.sh file and select run then nothing happens.
What i'm trying "Double... (3 Replies)
Discussion started by: cola
3 Replies
6. Shell Programming and Scripting
Hi Guru's,
I 'm trying to execute the below given script in Unix. I am having an issue with the script. The output of the script is given below:
#!/bin/bash
File_Home="/home/essftp/Risk"
cd /home/essftp/Risk
rm -f FileList
rm -f credit_risk*
file1=`ls -lt... (4 Replies)
Discussion started by: ranjith_taurean
4 Replies
7. UNIX for Dummies Questions & Answers
:)
hi Unix gurus,
Pls consider the following piece of code
str='hello'
length=echo $str|wc -c
echo $length
y= ` expr \( 80 - $length \) `
echo $y
:confused:
The last echo stmt is displaying 0 as the result.
If i put direct value like 6 instead of $length in i 3rd stmt it is giving... (8 Replies)
Discussion started by: ravi raj kumar
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
in my ksh script
expr 22 / 10 results as 2
but the actual result expected in 2.2.
how do i get that result. Please help
Thanks, (4 Replies)
Discussion started by: kotasateesh
4 Replies
9. Shell Programming and Scripting
Hi,
in my ksh script
expr 22 / 10 results as 2
but the actual result expected in 2.2.
how do i get that result. Please help
Thanks, (2 Replies)
Discussion started by: kotasateesh
2 Replies
10. Shell Programming and Scripting
Guys,
I've a problem in the "sed" command used in my shellscripts
This is the problamatic line in my shell script:
sed -e 's/${line1}/${line1_m}/g' prod_hier_1234.txt > test.txt
It doesn't do the job of replacing the string stored in variable 'line1' to 'line1_m'.
However If I replace the... (10 Replies)
Discussion started by: bhagat.singh-j
10 Replies