08-30-2011
I notice that you posted the identical question on LQ.org. Here is a reply from there.
Quote:
... There is no pass mark or degree waiting for any of us for passing YOUR assignment.
Also, if you read a little closer through the replies you will see that solution suggestions have been given, plus I am sure things haven't changed too much since I studied that the teacher / lecturer is asking you to do something
that has not been covered.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using ksh.
There is a report having amounts in the following format,
34343.67-
2343.45
23434.89-
I want to sum up all the amounts. For this I first need to find out if there is a minus sign at the end and prefix it before summing up. How to achieve this?
I thought of using an... (2 Replies)
Discussion started by: tselvanin
2 Replies
2. Shell Programming and Scripting
Hello, i am doing a project for school and i cannot figure out whats wrong with my 2 programs they dont seem to work at all.
the first program is called isprime and naturally it checks to see if hte number is prime or not
here is my code:
#!/usr/bin/bash
num=$1
echo you typed
if ... (2 Replies)
Discussion started by: jbou1087
2 Replies
3. UNIX for Dummies Questions & Answers
Suppose I have a script named "sc.sh"
in the script how to print out its name "sc.sh"? (3 Replies)
Discussion started by: meili100
3 Replies
4. Shell Programming and Scripting
Hello Experts,
I am new at this and need some help. I am looking for a delete command that allows me after I grep for the hostname to delete all the lines between two characters. for example I want to delete the first line all the way up to the } character
host test019 {
hardware ethernet... (10 Replies)
Discussion started by: ryanique
10 Replies
5. Shell Programming and Scripting
Hi,
The contents of my file is below:
Name,Location,Degree,Gender,Awards
Robert,Philadelphia,Accounting,Male,5
Jane,Chicago,Business,Female,2
Allan,New York,Engineering,Male,6
Tom,Detroit,Computer Science,Male,10
Nancy,Milwaukee,Engineering,Female,4
I want to add a "ID" in the 1st line... (2 Replies)
Discussion started by: xinoo
2 Replies
6. Shell Programming and Scripting
I have script as following..
server_status= some command | grep "Total error: 0"
if ; then
echo " Server $(hostname) is Down" >>Result
fi
else
echo " Server is OK on $(hostname)" >>Result
the if command seems to be not working properly for some... (13 Replies)
Discussion started by: s_linux
13 Replies
7. Homework & Coursework Questions
Hiiiiiiiiiiiii all,
Please i want your help fast, the teacher gave us this assignment can u help me to write it?
this is the question:
Write a shell script to point all prime numbers from the fibonacci series of integer N?
using Red hat Os
Thanks all and waiting for ur answers... (1 Reply)
Discussion started by: moonlips
1 Replies
8. Homework & Coursework Questions
hiiiiiiiiiiiii,,I found an error on my following script but couldnt find it!!! Can you please help me as soon as possible?!
echo "enter a number "
read n
i=0
first=0
second=1
result=0
prime="true"
echo –n " $first $second "
while
do
result=`expr $first + $second`
first=$second... (10 Replies)
Discussion started by: moonlips
10 Replies
9. Shell Programming and Scripting
Hi all,
can you plz check whether the below code is correct & some inputs.
I need to read the below file and process it.
input :
/home/ibm/var.txt
urgent
not urgent
not needed.
#!/usr/bin/ksh
VAR=/home/ibm/var.txt
if ]
then (7 Replies)
Discussion started by: ramkumar15
7 Replies
10. Shell Programming and Scripting
As per code it is getting matched. not sure why it assigning to cols=0.
Any inputs please.
Input : passed is
shell.sh c tablename.
if ; then
cols=1
table=$2
else
cols=0
table=$1
fi (1 Reply)
Discussion started by: ramkumar15
1 Replies
LEARN ABOUT CENTOS
xcb_list_fonts_names_length
xcb_list_fonts(3) XCB Requests xcb_list_fonts(3)
NAME
xcb_list_fonts - get matching font names
SYNOPSIS
#include <xcb/xproto.h>
Request function
xcb_list_fonts_cookie_t xcb_list_fonts(xcb_connection_t *conn, uint16_t max_names, uint16_t pattern_len, const char *pattern);
Reply datastructure
typedef struct xcb_list_fonts_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint16_t names_len;
uint8_t pad1[22];
} xcb_list_fonts_reply_t;
Reply function
xcb_list_fonts_reply_t *xcb_list_fonts_reply(xcb_connection_t *conn, xcb_list_fonts_cookie_t cookie, xcb_generic_error_t **e);
Reply accessors
int xcb_list_fonts_names_length(const xcb_list_fonts_reply_t *reply);
xcb_str_iterator_t xcb_list_fonts_names_iterator(const xcb_list_fonts_reply_t *reply);
REQUEST ARGUMENTS
conn The XCB connection to X11.
max_names The maximum number of fonts to be returned.
pattern_len
The length (in bytes) of pattern.
pattern A font pattern, for example "-misc-fixed-*".
The asterisk (*) is a wildcard for any number of characters. The question mark (?) is a wildcard for a single character. Use of
uppercase or lowercase does not matter.
REPLY FIELDS
response_type
The type of this reply, in this case XCB_LIST_FONTS. This field is also present in the xcb_generic_reply_t and can be used to
tell replies apart from each other.
sequence The sequence number of the last request processed by the X11 server.
length The length of the reply, in words (a word is 4 bytes).
names_len The number of font names.
DESCRIPTION
Gets a list of available font names which match the given pattern.
RETURN VALUE
Returns an xcb_list_fonts_cookie_t. Errors have to be handled when calling the reply function xcb_list_fonts_reply.
If you want to handle errors in the event loop instead, use xcb_list_fonts_unchecked. See xcb-requests(3) for details.
ERRORS
This request does never generate any errors.
SEE ALSO
xcb-requests(3)
AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
XCB
2014-06-10 xcb_list_fonts(3)