10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/bin/awk -f
BEGIN {
FS=":";
}
{
if ( $7 == "" ) {
print $1 ": no password!";
}
}
I want to execute this program for a particular user to check for his password from the file /etc/passwd (as the input file) and the user details to be given... (1 Reply)
Discussion started by: sri.phani
1 Replies
2. Shell Programming and Scripting
hi,
Is it possible to pass arguments to a sftp script and use those arguments in the program?
for example
sftp_script
FILENAME=$1
#!/usr/bin/expect
spawn /usr/bin/sftp abc@ftp.abc.com
expect "abc@ftp.abc.com's password:"
send "pass\r"
expect "sftp>"
send "mput $FILENAME\r"... (9 Replies)
Discussion started by: Little
9 Replies
3. UNIX for Dummies Questions & Answers
Hello,
Please, how can i pass arguments to my lib.so ? my lib.so is written in c and i need some arguments in the code ..
LD_PRELOAD=lib.so ./program
Thank you. (1 Reply)
Discussion started by: chercheur857
1 Replies
4. UNIX for Dummies Questions & Answers
We have a program source C and is required to indicate how many times each function is called from the C program. also print the line number where there is a call.
I've tried something like this:
#!/bin/sh
for i in $*;do
if !
then
echo $i is not a C file.
else echo $i... (0 Replies)
Discussion started by: oana06
0 Replies
5. Shell Programming and Scripting
Hi All,
I have a file which sets all the variables on unix , based on the hostname. Currently these variables are hardcoded in the cobol programs.I was wondering if unix variables can be used in Cobol programs ?
Example :
I have a variable $SHTEMP which is set based on the following :
Prod... (2 Replies)
Discussion started by: nua7
2 Replies
6. Shell Programming and Scripting
Hi,
I have to use ksh on HP-UX for some scripting.
I usually use "set -e -u" in scripts to stop if errors occur or a typo is in a variable name.
Now I try to use "$@" to pass the arguments unchanged to another function, which works without problems - unless I try to call the script without... (7 Replies)
Discussion started by: michas
7 Replies
7. UNIX for Advanced & Expert Users
Hi Guys,
I am trying to pass arguments to the script i am wrinting.
When no argument is passed or wrong argument is passed, the script needs to output the way it needs to be called and exit.
Currently, when no arguments is passed, it is not getting exited but goes on assuming those... (3 Replies)
Discussion started by: mac4rfree
3 Replies
8. UNIX for Dummies Questions & Answers
Basically, I'm trying to install this program called MAQ.
Maq User's Manual
I've downloaded it and I tried to type in $ ./configure; make; make install
but the ouput I got was this:
bash: ./configure: No such file or directory
make: Entering directory `/home/vlay/bwa-0.5.0'
make:... (8 Replies)
Discussion started by: vlay2
8 Replies
9. Shell Programming and Scripting
Hi,
I have a my script here--
print "The Perl Script does the User health check and system health check...\n";
print "---------------------------------------------------------------------\n";
# use strict;
my($OS);
$OS = $^O;
# need to test @ARGV before GetOptions shifts it
if (@ARGV... (1 Reply)
Discussion started by: namishtiwari
1 Replies
10. UNIX for Advanced & Expert Users
Dude,
I want to kill a process, but the processid is in a text file. I have to read the text file for the process id and pass it as parameter to the kill command.
Example
$ cat prcid.txt
18650
I want to pass the value 18650 as a process id to kill command.
$ kill -9 <value read from... (4 Replies)
Discussion started by: aksmuralee
4 Replies