Here is my snippet of code...
getDescription()
{
DESCRIPTION=$(dbaccess dncsdb - << ! 2>/dev/null|sed -e 's/hctt_description//' -e '/^$/ d'|tr -d '\r'
select hct_type.hctt_description
from hct_type,hct_profile
where hct_type.hctt_id=hct_profile.hctt_id
and... (5 Replies)
I hope this makes sense, but I need help with what is indicated with %%, below :
A.) ####List active servers and send to file####
# ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results
client302
client306
client309... (1 Reply)
Hi,
I got some log files which print the whole xml message in separate lines:
e.g.
2008-10-01 14:21:44,561 INFO do something
2008-10-01 14:21:44,561 INFO print xml : <?xml version="1.0" encoding="UTF-8"?>
<a>
<b>my data</b>
</a>
2008-10-01 14:21:44,563 INFO do something again
I want... (3 Replies)
I'm parsing through a large lslpp -Lc output file with a for loop. The file contains many lines similar to this:
zip:zip-2.3-3:2.3: : :C:R:A file compression and packaging utility compatible with PKZIP.: :/bin/rpm -e zip: : : : :0:
There appears to be no specialized or secret markup in the... (5 Replies)
Hi everyone,
I have gone through the forum trying to find an answer to this question but was unsuccessful. I am hoping that someone can help me with this please.
I am trying to get my script to recognise line breaks from a file and to give me a result for wc of each line. So basically, if you... (7 Replies)
Hi All,
I've a csv file in which the record is getting break into 1 line or more than one line. I want to combine those splits into one line and remove the unwanted character existing in the record i.e. double quote symbol ("). The line gets break only when the record contains double... (4 Replies)
Hello,
I want to keep line spaces in comments but clean more then 2 after each.
Example:
$sentence="This is my first sentence
This will be in a new row
This will be too in a new row but not separated with 3line breaks just with
one
";
And i want to... (1 Reply)
I have a shell script, and its pretty much done, I decided to add a loop that ends or continues depending on user input. like "would you like to continue?" and if I hit y or yes it will run the loop again until I hit n or no and breaks out of the loop.
To be hones I didn't think I needed to add... (2 Replies)
Hi All,
Need an urgent solution to an issue . We have created a ksh file or shell script which generates 1 DAT file. the DAT file contains extract of a select statement .
Now the issue is , when we are executing the ksh file , the output is coimng with page breaks and line breaks .
We have... (4 Replies)
Heyas
I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter).
The typewriter-part is a 'bonus' but still has its own flaws, but thats for later.
So in some way, i'm trying to rewrite cat using bash and other commands.
But sadly it fails on... (2 Replies)
Discussion started by: sea
2 Replies
LEARN ABOUT MINIX
stty
STTY(1) General Commands Manual STTY(1)NAME
stty - set terminal parameters
SYNOPSIS
stty [-ag]
stty encoded-form
stty speed ispeed speed ospeed speed cs5 cs6 cs7 cs8 [-]parenb [-]parodd [-]hupcl [-]cstopb [-]cread [-]clocal [-]ignbrk [-]brkint [-]ign-
par [-]parmrk [-]inpck [-]istrip [-]inlcr [-]igncr [-]icrnl [-]ixon [-]ixoff [-]ixany [-]opost [-]onlcr [-]xtabs [-]onoeot [-]isig
[-]icanon [-]iexten [-]echo [-]echoe [-]echok [-]echonl [-]noflsh [-]lflusho eof=c eol=c erase=c erase=c intr=c kill=c quit=c susp=c
start=c stop=c rprnt=c lnext=c flush=c min=n time=n rows n cols n cooked raw [-]evenp [-]parity [-]oddp [-]nl ek sane
DESCRIPTION
Stty shows or changes the parameters of the terminal connected to standard input. Stty takes a myriad of arguments most of which are
mapped directly to the flags and special characters described in tty(4), so we won't describe them here.
Stty has three forms of operation. First, without any arguments stty shows all terminal attributes that are different from the default
state. Option -a makes stty print all terminal attributes, and -g lets stty print the attributes in a special encoded form, a simple row
of colon separated hexadecimal numbers.
In the second form of operation stty takes an encoded form as produced by the -g option and sets the terminals attributes to its decoded
value.
In the third form stty interprets a series of flags and parameters settings and modifies the terminal attributes accordingly. Flags can be
given as icanon or -icanon for instance, either setting or clearing the ICANON flag. Special character values can by set like intr=^C for
example, which sets the interrupt character to CTRL-C. You can either use a real CTRL-C, or the two characters `^' and `C'. In any case
it is probably necessary to use quotes to guard it from the shell: intr='^C'.
A number alone is interpreted as a baud rate setting for both the input and output rate. The input or the output rate can be set sepa-
rately with use of the ispeed and ospeed prefixes to the number. The character size can be set with cs5, cs6, cs7 or cs8.
The MIN and TIME value, and the number of rows and columns of the window can also be set using one of the keywords min, time, rows or cols,
followed by a decimal number that is the value of the setting.
Stty accepts several keywords that are not named by corresponding flags or parameters in tty(4). They set several attributes at once:
cooked Same as icrnl ixon opost onlcr isig icanon iexten echo, setting all the attributes that are needed for line oriented mode.
raw Same as -icrnl -ixon -opost -onlcr -isig -icanon -iexten -echo, setting all the attributes for a raw data channel.
evenp parity
These synonyms are equal to cs7 parenb -parodd, setting the line to 7 bits even parity.
oddp Same as cs7 parenb parodd, setting the line to 7 bits odd parity.
-parity -evenp -oddp
All synonyms for cs8 -parenb, setting the line to 8 bits, no parity.
nl Same as icrnl, setting carriage return to line feed input translation.
-nl Same as -icrnl -inlcr -igncr, disabling any carriage return or line feed handling.
ek Set the ERASE and KILL special characters back to the default.
sane Set all attributes to the default except things like the line speed and parity, because their "sane" value is probably what it is
right now. The default values are compiled into stty from the <termios.h> include file. Use stty sane; stty -a to know what they
are.
FILES
/etc/ttytab The init field of this file may contain an stty command to set the attributes to match an attached RS232 terminal or modem.
SEE ALSO tty(4), ttytab(5).
NOTES
The cooked, raw, rows and cols keywords are Minix additions beyond the keywords defined by POSIX. Rows and cols are common UNIX exten-
sions, however. There are more Minix specific flags that match the Minix specific attributes described in tty(4).
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
STTY(1)