10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to pass a second argument like so:
if ] then
export ARG2=$2
else
message "Second argument not specified: USAGE - $PROGRAM_NAME ARG1 ARG2"
checkerror -e 2 -m "Please specify if it is a history or weekly (H or W) extract in the 2nd argument"
fi
however, it always goes... (4 Replies)
Discussion started by: MIA651
4 Replies
2. Shell Programming and Scripting
How to pass the alphabet character as a argument in case and in if block?
ex:
c=$1
if a-z ]]
then
echo "alphabet"
case $1 in
a-z) echo "the value is a alphabet"
edit by bakunin: please use CODE-tags. We REALLY mean it. (9 Replies)
Discussion started by: Roozo
9 Replies
3. Shell Programming and Scripting
Hi,
I have a script that is scheduled with cron and runs every night. The cron part looks like this:
00 20 * * 0,1,2,3,4,5,6 /usr/local/bin/BACKUP TBTARM HOT DELETE
My issue is with the 3rd parameter. Somewhere in the script, i want to tell the script to delete some files if the 3rd... (7 Replies)
Discussion started by: dollypee
7 Replies
4. Shell Programming and Scripting
hi,
I want to implement some function to perform following task
if ; then
$TEXT = "Data_0"
else
$TEXT = $1
fi
if ; then
$Lines = 45
else
$Lines = $2
fi
Kindly suggest,
thanks (11 Replies)
Discussion started by: nrjrasaxena
11 Replies
5. Shell Programming and Scripting
Hi all,
In the given script code .
I want to pass the maximum value that variable "i" will have in function DivideJobs () to variable $max of function SubmitCondorJob().
Any help?
Thanks
#!/bin/bash ... (55 Replies)
Discussion started by: nrjrasaxena
55 Replies
6. Programming
I use solaris10,following is tcp client code:
#include "cliserv.h"
int main(int argc,char argv){
struct sockaddr_in serv;
char request,reply;
int sockfd,n;
if(argc!=2)
err_quit("usage: tcpclient <IP address of server>");
if((sockfd=socket(PF_INET,SOCK_STREAM,0))<0)
... (1 Reply)
Discussion started by: konvalo
1 Replies
7. Shell Programming and Scripting
Hi all
I have got a file digits.data containing the following data
1 3 4
2 4 9
7 3 1
7 3 10
I am writing a script that will pass an argument from C-shell to nawk command. But it seems the values in the nawk comman does not get set. the program does not print no values out. Here is the... (2 Replies)
Discussion started by: ganiel24
2 Replies
8. UNIX for Dummies Questions & Answers
I have some folders with this structure:
/data/me/a123xxx
Where "xxx" is some changing series of letters, and "123" changes so folders might look like: /data/me/a123xxx
/data/me/a234ysd
/data/me/a534sds etc. The numbers are what matter to me (they identify the folder), so I created an... (7 Replies)
Discussion started by: ramparts
7 Replies
9. Shell Programming and Scripting
Hi All,
i have script like below..
echo "1) first option"
echo ""
echo "2) second option"
echo ""
echo "*) please enter the correct option"
read select
case $select in
1) echo "first option selected"
;;
2) echo "second option selected"
;;
*) echo "please enter the correct... (4 Replies)
Discussion started by: Shahul
4 Replies
10. Shell Programming and Scripting
i'm trying to pass a numerical argument with function xyz to print specfic lines of filename, but my 'awk' syntax is incorrect.
ie
xyx 3 (prints the 3rd line, separated by ':' of filename)
function xyz() {
arg1=$1
cat filename | awk -F: -v x=$arg1 '{print $x}'
}
any ideas? (4 Replies)
Discussion started by: prkfriryce
4 Replies