02-20-2009
hi to all
the below is the command..........
# nu user=xxx os=unix pgroup=xxxxx
i used below line to get the pgroup name.
--> PGRP=$(echo "$@" |cut -f2 -d'=')
if the user use the pgroup option the above syntax works fine.
if the user don't use the pgroup option the above syntax is failing.
if they don't use the pgroup option it should go to default set.
any suggestions....
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a shell function which returns string(ksh). The string is an sql statement.
This statement can have '*' in its content (i.e. select 100 / 2 *100 from dual).
When this happens ret_str will have contents of current directry I run the script from build in sql. Is there any way to fix it... (2 Replies)
Discussion started by: zam
2 Replies
2. Solaris
I was hired by a company, and part of the agreement is that I complete the first exam for SCSA Solaris 10 within 60 days, and that I complete the second exam 60 days after that. Other than a book off of amazon, and downloading e-exams online does anyone have any suggestions? (2 Replies)
Discussion started by: brianbullard
2 Replies
3. Shell Programming and Scripting
HI all,
Very new to shell programming and just wanted some help on how to solve the following problem.
I have a small shell script which searches a given file and extracts some string parameters. I want to now be able to call this script from another shell script and somehow pass the parameters... (11 Replies)
Discussion started by: pxy2d1
11 Replies
4. Shell Programming and Scripting
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Discussion started by: goddevil
19 Replies
5. Homework & Coursework Questions
attempting the hangman program. This was an optional assignment from the professor. I have completed the logical coding, debugging now.
##I have an array $wordString that initializes to a string of dashes
##reflecting the number of letters in $theWord
##every time the user enters a (valid)... (5 Replies)
Discussion started by: lotsofideas
5 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am using git bash terminal window to do git operations. I have set the prompt string variable PS1 in the ~/.bashrc file as follows:
export PS1=" "
This is intended to show me the current git branch's name which is active as part of the prompt string. But, the problem is when I do a git... (2 Replies)
Discussion started by: royalibrahim
2 Replies
7. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
8. Shell Programming and Scripting
I have a file example.txt as follows :SomeTextGoesHere
$$TODAY_DT=20140818
$$TODAY_DT=20140818
$$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script.
(It would even be better if I could pass... (5 Replies)
Discussion started by: SriRamKrish
5 Replies
9. Shell Programming and Scripting
Hi,
I am using awk here.
Inside an awk script, I have a variable which contains a very long XML data in string format (500kb).
I want to pass this data (as argument) to curl command using system function.
But getting Too many arguments error due to length of string data(payloadBlock).
I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
10. Shell Programming and Scripting
I need to pass days in past 3, 4, 5 day in strings.
Today is Feb 7, so past 3, 4, 5 days are:
day1="Feb 2"
day2="Feb 3"
day3="Feb 4"
I have set day1 day2 day3 as the variables. So, what I need is to have the day stings to be past 3, 4, 5 days every day.
If it Feb 8, they need to... (11 Replies)
Discussion started by: danielshell
11 Replies
LEARN ABOUT FREEBSD
db_show_command
DB_COMMAND(9) BSD Kernel Developer's Manual DB_COMMAND(9)
NAME
DB_COMMAND, DB_SHOW_COMMAND, DB_SHOW_ALL_COMMAND -- Extends the ddb command set
SYNOPSIS
#include <ddb/ddb.h>
DB_COMMAND(command_name, command_function);
DB_SHOW_COMMAND(command_name, command_function);
DB_SHOW_ALL_COMMAND(command_name, command_function);
DESCRIPTION
The DB_COMMAND() macro adds command_name to the list of top-level commands. Invoking command_name from ddb will call command_function.
The DB_SHOW_COMMAND() and DB_SHOW_ALL_COMMAND() are roughly equivalent to DB_COMMAND() but in these cases, command_name is a sub-command of
the ddb show command and show all command, respectively.
The general command syntax: command[/modifier] address[,count], translates into the following parameters for command_function:
addr The address passed to the command as an argument.
have_addr A boolean value that is true if the addr field is valid.
count The number of quad words starting at offset addr that the command must process.
modif A pointer to the string of modifiers. That is, a series of symbols used to pass some options to the command. For example,
the examine command will display words in decimal form if it is passed the modifier "d".
EXAMPLE
In your module, the command is declared as:
DB_COMMAND(mycmd, my_cmd_func)
{
if (have_addr)
db_printf("Calling my command with address %p
", addr);
}
Then, when in ddb:
db> mycmd 0x1000
Calling my command with address 0x1000
db>
SEE ALSO
ddb(4)
AUTHORS
This manual page was written by Guillaume Ballet <gballet@gmail.com>.
BSD
August 27, 2008 BSD