I am writing a C program that part of the idea is to using a command line parameter to control not to run certain part of the sub program.
I am totally new to C, I do not have any idea how to pass a command line arguments from a C program.
Can anyone help ?!
Thanks (3 Replies)
Say I have (in psuedocode)
For i=1 to 10
tar cvfb /... 5*i /junk(i)
end
What I mean is that I want each successive for loop to have the block size parameter be 5 times the current counter. This isn't my actual code, just a stupid example...So the question is how do I descrive that parameter... (2 Replies)
"$#" gives the number of command-line arguments. How do you get the last command-line parameter (or any particular one determined by a variable)? I thought it would be "${$#}", but that produces something completely unexpected. (4 Replies)
I have two input files (given below) and to compare each line of the File1 with each line of File2 starts with '>sample1'. If a match occurs and that matched line in the File2 contains another line or sequence of lines starting with "Chr" they have to be displayed in output file with that sample.... (4 Replies)
one.txt
ONS.1287677000.820.log 20Oct2010
ONS.1287677000.123.log 21Oct2010
ONS.1287677000.456.log 22Oct2010
two.txt
ONS.1287677000.820.log:V AC CC EN
ONS.1287677000.123.log:V AC CC EN
ONS.1287677000.820.log:V AC CC EN
In file two.txt
i have to look for pattern which column one... (17 Replies)
I have a simple script that builds a complex program call which passes a number of parameters to the program. I'm trying to enhance the script to include the value of the command line parameter in the name of a file being created. The problem I'm having is that the parameter may include a forward... (11 Replies)
i am a beginner, i want to make a program that takes any command line arguments... and print it out in reverse.
ie. if the command line argument is "thanks for helping me"
i want it to output "me helping for thanks" :D
i have tried using the reverse command, but i cant get it working!!
... (3 Replies)
Hi,
I need to compare two files using shell scripting.
Say like:
File1
AAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCC
eeeeeeeeeeeeeeeeeeeeeeeee
DDDDDDDDDDDDDDDDDDDDDDDDDDDD
File2
BBBBBBBBBBBBBBBBBBBBB
DDDDDDDDDDDDDDDDDDDDDDDDDDDD
AAAAAAAAAAAAAAAAAAAA
... (6 Replies)
hey i am using this code to connect to sql , store the value in variable and then
compare it with another variable after some time by executing the same query
but the desired result is not coming
#!/bin/bash
val=$(sqlplus -s rte/rted2@rel76d2 <<ENDOFSQL
set heading off
set feedback off... (11 Replies)
Discussion started by: ramsavi
11 Replies
LEARN ABOUT SUNOS
yppasswdd
yppasswdd(4) File Formats yppasswdd(4)NAME
yppasswdd - configuration file for rpc.yppasswdd (NIS password daemon)
SYNOPSIS
/etc/default/yppasswdd
DESCRIPTION
The yppasswdd file contains a parameter that modifies the behavior of the rpc.yppasswdd(1M) daemon.
The yppasswdd file contains a single parameter:
#check_restricted_shell_name=1
By default in the current release, this line in yppasswdd is commented out. If you uncomment the line, when a user attempts to change his
default shell using `passwd -r nis -e` (see passwd(1)), the rpc.yppasswdd daemon checks whether the name of the user's current shell
begins with an 'r'. rpc.yppasswdd considers any shell whose name begins with an 'r' (for example, rcsh) to be a restricted shell. If a
user's shell does begin with 'r', his attempt to change from the default shell will fail.
If the line in the yppasswdd file is commented out (the default), the rpc.yppasswdd daemon does not perform the restricted shell check.
The yppasswdd file is editable only by root or a member of the sys group.
FILES
/etc/default/yppasswdd configuration file for rpc.yppasswdd daemon
SEE ALSO rpc.yppasswdd(1M)SunOS 5.10 8 Nov 2001 yppasswdd(4)