Sponsored Content
Full Discussion: While $$$$$$
Top Forums Shell Programming and Scripting While $$$$$$ Post 302228752 by rollthecoin on Monday 25th of August 2008 10:45:23 AM
Old 08-25-2008
While $$$$$$

db2 connect...

LINE=........

while [ "$LINE" != 0 ]
do
read LINE
A=`echo $LINE|awk -F/ '{print $1}'`
B=`echo $LINE|awk -F/ '{print $2}'`
done

echo $A
echo $B
db2 terminate
script ends here

I want to substitute values like

10-hjhj 20=hj 307fgr/45fdg 85fgf56 2fg-lk
10-h 20=hj 307fgr/45gfdg 85fgfdf3453456 2fg-lk
10-hdfgdfjhj 20=hj 307fgdfggr/45fdg 85fgf56 2fg-lk

I want to get the value in $A as 10-hjhj 20=hj 307fgr
and $B as 45fdg 85fgf56 2fg-lk

go to a particular directory cd A/D/$A/$B

then proceed with the next input
$A as 10-h 20=hj 307fgr
$B as 45gfdg 85fgfdf3453456 2fg-lk

go to a particular directory cd A/D/$A/$B
.
.
.
Please help
 
echo(3XCURSES)						  X/Open Curses Library Functions					    echo(3XCURSES)

NAME
echo, noecho - enable/disable terminal echo SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int echo(void); int noecho(void); DESCRIPTION
The echo() function enables Echo mode for the current screen. The noecho() function disables Echo mode for the current screen. Initially, curses software echo mode is enabled and hardware echo mode of the tty driver is disabled. The echo() and noecho() functions control soft- ware echo only. Hardware echo must remain disabled for the duration of the application, else the behavior is undefined. RETURN VALUES
Upon successful completion, these functions return OK. Otherwise, they return ERR. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), getstr(3XCURSES), initscr(3XCURSES), libcurses(3XCURSES), scanw(3XCURSES), attributes(5), standards(5) SunOS 5.10 5 Jun 2002 echo(3XCURSES)
All times are GMT -4. The time now is 11:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy