How to understand special character for line reading in bash shell?
I am still learning shell scripting. Recently I see a function for read configuration. But some of special character make me confused. I checked online to find answer. It was not successful. I post the code here to consult with expert or guru to get better understanding on these special characters such as:^[^#]*=,line%%=*,line#*=. how to understand the usage of these special character here. Thanks.
Hello,
On Sco OpenServer 5, i want to print using the lpr command, no CUPS installed.
I print on an HP LaserJet 4050 on LAN (IP 192.168.x.x)
the printer is installed by HP Network Printer service.
it works fine, but Specials characters, like é, @ or ° print bad characters.
Is there... (5 Replies)
Hi, experts.
Whould anybody clear explay me difference and usage of these 3 commands (particulary in bash) :
exec
eval
source
I've tryed to read the manual pages but did not get much.
Also could not get something useful from Google search - just so much and so not exactly, that is... (3 Replies)
I used following to add * at the end of the line in file1.
It adds * at the end but has a space before it for some lines but some other lines it adds exactly after the last character.
How do I take out the space ?
sed 's/$/*/' file1 > file2
example:
contents of file1 :
... (2 Replies)
Hi,
I have a log file generated by a tool which has the following look :
/tmp/releases/directory/datefilename1_release_date.zip
/tmp/releases/directory/datefilename2_release_date.zip
/tmp/releases/directory/datefilename3_release_date.zip... (8 Replies)
I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done.
I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
I am using this character as a delimiter 'þ'
Currently, I set it straight:
DELIMITER='þ'
However, while copying the file, this character often gets mangled. Is there a bash way (perhaps using tr or printf) of generating this character.
It corresponds to
"chr(0xfe)" if using perl. (I've... (6 Replies)
Hi all,
I have a file with some module names as below.
Font::AFM
Data::Grove ---> libxml-perl
Net::LDAP ---> perl-ldap
DBI
XML
....
...
....
and so on ...
The file has some lines with the character " -->" .
Now how can I cut only the last column of the line wherever "-->" is... (4 Replies)
Hello every one and thanks in advance for the time you will take to think about my problem.
I would like to know if it's possible (in BASH) to read a text file character after character.
Exactly this is what I would like to do :
Txt file : ATGCAGTTCATTGCCAAA...... (~2.5 millions... (3 Replies)
when I execute the unix commands its works normally in the 1st part.
When I the tried the same in shell scripting the directory is not displayed in 2nd part example. please let me know what needs to be done.
Unix :
client=~zsvdbs
echo $client
/shome/zsvhome/zsvdbs
Using... (3 Replies)
Hi,
I am new in bash scripting. In my work, I provide support to several users and when I connect to their computers I use the same admin and password, so I am trying to create a script that will only ask me for the IP address and then connect to the computer without having me to type the user... (5 Replies)
Discussion started by: arcoa05
5 Replies
LEARN ABOUT HPUX
slp
slp(1) General Commands Manual slp(1)NAME
slp - set printing options for a non-serial printer
SYNOPSIS
cols] indent] lines] pages] pages]
DESCRIPTION
sets printer formatting options such as the number of lines per page, number of characters per line, and indentation. These characteris-
tics are controlled by the printer driver as described in lp(7). acts on the current standard output.
Options
recognizes the following options and arguments:
Report all option settings.
Specify a character printer
where backspace characters pass through the driver unchanged. The absence of this option indicates a line printer.
The driver takes the necessary action to accommodate backspace characters.
Resets the printer back to line-printer mode.
Limit the number of columns to be printed to
cols. Characters beyond the specified limit are truncated.
Reset options to default for the device.
This action is not taken until the next open occurs on the device.
Indent indent columns before printing the first column.
Select cooked mode.
Cooked mode must be used with a cooked device special file which is identified by an lp mnemonic that is not preceded
by the character
Specify the number of
lines per page. The last new-line character of each page is changed to a form-feed.
Set the page size to infinity.
Since the last new-line of the page is never encountered, no new-line characters are changed to form-feeds.
Select a raw mode for graphics dumps.
All other options are ignored except If the option is not given, is assumed.
Eject zero or more
pages after the final close of the device.
Eject zero or more
pages when the device is opened.
EXAMPLES
In a typical case, the printer is set to 80 columns, no indentation, with no form-feeds between pages:
WARNINGS
Use of the command in conjunction with the spooler (see lp(1)) might cause undesirable side effects. The spooler model files make assump-
tions regarding the configuration and can get confused when the default values are altered. Although most options can be altered without
difficulty, special problems sometimes result from adjusting the number of lines and the number of columns per page.
AUTHOR
was developed by HP.
SEE ALSO lp(1), ioctl(2), lp(7).
slp(1)