07-24-2009
Hello Zaxxon,
Thank you for confirming that my thought process was correct.
Let us consider the code you gave, I want to avoid writing "my_func2" twice. Can we do that?
Thank You.
Regards,
HKansal
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I am having a problem setting a range of numbers for the "case" structure.
I can use with no problems, but
when I use it doesn't work???
Does the case struture allow numeric ranges?
eg:
echo -e "enter number between 0 and 60: \c"
read $answer
case $answer in
) echo... (2 Replies)
Discussion started by: Joe54321
2 Replies
2. UNIX for Dummies Questions & Answers
Hi all
Is it possible to copy a structure of a directory only.
e.g.
I have a file with the following entries that is a result of a find :-
/dir1/dir2/file.dbf
/dir1/dir2/dir3/file1.dbf
/dir1/file.dbf
I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies
3. Shell Programming and Scripting
Hi,
Can anyone help me with the following case structure?
echo "Please enter the date for which you want the Report:\c"
read dat
d1=`echo $dat|cut -c7-8`
m1=`echo $dat|cut -c5-6`
y1=`echo $dat|cut -c1-4`
yr=`expr "$d1" - 1`
case "$yr" in
0)
MONTH=`expr "$m1" - 1`... (4 Replies)
Discussion started by: kamitsin
4 Replies
4. Programming
Hello Groups
I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records.
if we loop it in both the structures it is going to consume time.
I am looking for a simple... (3 Replies)
Discussion started by: dhanamurthy
3 Replies
5. UNIX for Dummies Questions & Answers
Hello Experts,
I ve been trying to build another shell where I am using the following code.
transact="tv5cpc1"
case "$transact" in
"...cp..")
xActType=""
;;
"...de..")
xActType="sp_dep"
;;
"...ep..")
xActType="sp_epa"
;;
"....v.")
... (4 Replies)
Discussion started by: hkansal
4 Replies
6. Shell Programming and Scripting
Hi,
while true
do
printf "$FBOLD\nPlease enter the minutes (0-59): $FREG"
read MIN
case "$MIN" in
||s) break 2;;
*)
echo ""
echo "Invalid minutes, please try again.";;
esac
done
In the above... (4 Replies)
Discussion started by: milink
4 Replies
7. Shell Programming and Scripting
Hi folks,
I am new to bash scripting so please excuse my question.
Is there any chance to combine a case structure with the read command?
Like
case (read -p "" variable) in
x)
Thx! (7 Replies)
Discussion started by: haukee
7 Replies
LEARN ABOUT DEBIAN
dgr2file
DGR2FILE(1) DGR executables DGR2FILE(1)
NAME
dgr2file - DGR reception test program
SYNOPSIS
dgr2file
DESCRIPTION
dgr2file uses DGR to receive multiple copies of the text of a file transmitted by file2dgr, writing each copy of the file to the current
working directory. The name of each file written by dgr2file is file_copy_cycleNbr, where cycleNbr is initially zero and is increased by 1
every time dgr2file closes the file it is currently writing and opens a new one.
Upon receiving a DGR datagram from file2dgr, dgr2file extracts the content of the datagram (either a line of text from the file that is
being transmitted by file2dgr or else an EOF string indicating the end of that file). It appends each extracted line of text to the local
copy of that file that dgr2file is currently writing. When the extracted datagram content is an EOF string (the ASCII text "*** End of the
file ***"), dgr2file closes the file it is writing, increments cycleNbr, opens a new copy of the file for writing, and prints the message
"working on cycle cycleNbr."
dgr2file always receives datagrams at port 2101.
EXIT STATUS
0 dgr2file has terminated.
FILES
No configuration files are needed.
ENVIRONMENT
No environment variables apply.
DIAGNOSTICS
can't open dgr service
Operating system error. Check errtext, correct problem, and rerun.
can't open output file
Operating system error. Check errtext, correct problem, and rerun.
dgr_receive failed
Operating system error. Check errtext, correct problem, and rerun.
can't write to output file
Operating system error. Check errtext, correct problem, and rerun.
BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu>
SEE ALSO
file2dgr(1), dgr(3)
perl v5.14.2 2012-05-25 DGR2FILE(1)