10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
2. Shell Programming and Scripting
Hi,
I have used expr command to increment the date.
for e.g.,
case 1 :
echo $(date -d $(echo `expr 20010101 + 1`))
it returns
Tue Jan 2 00:00:00 IST 2001
case 2:
echo $(date -d $(echo `expr 20010101 - 1`))
it returns
date: invalid date `20010100'
please suggest me, how to... (3 Replies)
Discussion started by: nanthagopal
3 Replies
3. Shell Programming and Scripting
Dear Brothers!
Need your help for the case where I am running one command on prompt and its giving us the correct output, but when i use the same command from shell its directs no output.:wall:
the command on command prompt is
ls -ltrh * | nawk '{if ($5~ '/$'M'/') print $9}' | grep -v... (1 Reply)
Discussion started by: jojo123
1 Replies
4. 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
5. 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
6. 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
7. 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
8. UNIX for Advanced & Expert Users
when i use the following command
find / -name '*.*' -exec grep -il 'text' {} \;
I can redirect the errors to /dev/null. This happens only in ksh but not in csh. the 2>/dev/null is not working in csh. Can you some one suggest an alternative for this in csh ? (3 Replies)
Discussion started by: dhanamurthy
3 Replies
9. 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
10. Shell Programming and Scripting
i wrote plsql procedure that executed shell command
using java class
my problem is that in some reason
the shell command ( liks Is -l , mv ... ) are not recordnize
can someone help me with that
10x
Alodvg (2 Replies)
Discussion started by: alodvg
2 Replies