10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a program
int main(int srgc, char *argv)
{
for(int i=1; i<50; i++)
{
system("dd if=/dev/zero of=file$i bs=1024 count=$i");
}
return 0;
}
My doubt is how to use the "$i" value inside C code
Please help (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
2. Shell Programming and Scripting
Hi,
I wrote a simple script, which will call other scripts or run commands on a UNIX server. my script has multiple steps/commands with some delay in between.
I usually get some email notifications after the successful execution of each step.
**My intention is to get email alerts when it is... (5 Replies)
Discussion started by: System Admin 77
5 Replies
3. Shell Programming and Scripting
Hello
I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that:
#!/bin/ksh
echo "Start ....."
rman target=/ << EOF
RUN {
delete force noprompt archivelog until time 'sysdate-10';
}
EXIT;
EOF
echo "END ..."
echo... (6 Replies)
Discussion started by: samer.odeh
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
does any one know the environmental parameter that I have to set so as to make sure the file operations run properly within the script.
right now when I am doing a cat from within the script nothing happens, same is the case when I do a grep. when I am doing awk '{print $0 }' its printing... (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies
5. Shell Programming and Scripting
Hi Folks,
I have a text file which may or may not have any data.
I would like to email the file, via a Korn shell script, if the file is not empty.
I am fiddling around with the wc -l command, but no luck so far. The pseudo code is as follows
count=`wc -l test.txt`
if
cat test.txt... (4 Replies)
Discussion started by: rogers42
4 Replies
6. Shell Programming and Scripting
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Discussion started by: Shri123
6 Replies
7. UNIX for Advanced & Expert Users
I have a reqirement to serialise various rsh scripts that hit my server from an external scheduler. No matter how many scripts come via rsh, only one should execute at a time and others should wait.
I have made the scheduler make a request to my shell script with the command to be run as a... (4 Replies)
Discussion started by: nkamatam
4 Replies
8. Shell Programming and Scripting
Dears,
I'm new in shell scripting and i need your help, i would like to know how can i create a script to ftp to a certain unix/linux machine/server IP address and get a file for example without user intervention? How can i force the script to use a certain username and password to access this... (4 Replies)
Discussion started by: Dendany83
4 Replies
9. Shell Programming and Scripting
Hi,
In sed, is it possible to match patterns by directly executing UNIX commands inside sed?
For e.g. -
sed "s/`cat file.txt | cut -d "|" -f2`/replace_string"
Will the above command work?
My expectation is to search for the second field in file.txt (file delimited by | ) and replace... (10 Replies)
Discussion started by: devanathann
10 Replies
10. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies