Programming :: Using Awk For Displaying Of Row?

Jan 24, 2010

Code:

Database
rina lives:fatin:20:20:20
rina:fatin:20:20:20

i am having a small problem in extracting out the information from the database. For example, if i were to input a book titled rina into my search , i would only want it to display the row which has the title rina, like this

Code:

rina:fatin:20:20:20

but when i use a coding like this :

Code:

grep -i "$Title" fruit| awk -F":" '{ print $0}'`

its displays both titles and their information

Code:

rina lives:fatin:20:20:20
rina:fatin:20:20:20

for some reason, it will read both rows as both contains the word "rina".

View 8 Replies


ADVERTISEMENT

Programming :: Socket Programming While Displaying Received Message In File

May 11, 2011

i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....

Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....

now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..

View 2 Replies View Related

Programming :: Displaying The Information Using Awk?

Jan 14, 2010

i am using awk to display my information in a certain order.

Database :

Code:

Persia:42:John
France:50:Mabel
Persia:50:Rach
Germany:60:John

My expected output is :

Code:

Title Price Author
Persia 42 John
France 50 Mabel

[code]....

I tried using cut command but it also gives me the same problem. If i do not assign it to a variable, how am i able to format it to display it in the correct format?

View 4 Replies View Related

Programming :: Displaying Unicode Characters

Feb 19, 2011

I wrote a java program that writes strings to a file. The strings contain foreign language characters. When I run the program in Windows, the output file shows the foreign characters. However, when I attempt the same operation in Linux, the output file shows a white question mark in a black background instead of the foreign characters. The same Linux system could display the foreign characters if I copy the output file from Windows to Linux. I tried to create the output file using gedit that my program would then add additional strings to and chose Unicode-32 for encoding but still the same problem.

What could I do to get the program to display the foreign language characters from output text file?

View 6 Replies View Related

Programming :: Find What Is Displaying In A Terminal?

Jan 23, 2011

Is there any way to find what is displaying in a terminal in C language?

I want to automate ssh login process, I know that I can use "expect" but I want to write another program in C myself.

In first ssh try to a host, ssh prints a message like this:

Quote:

The authenticity of host '192.168.30.1 (192.168.30.1)' can't be established. RSA key fingerprint is **** Are you sure you want to continue connecting (yes/no)?

and waits for an answer. I want to enter "yes" programatically when the message appears, but I don't know how to find if the message is appeared or not. In this case problem can be solved in another way, deleting the entry of the host from ~/.ssh/known_hosts before executing the ssh command, sleeping for one or two second and entering yes. Same problem exist for password prompt and this can be solved by sleeping, too.

But it is not a general solution and can be failed if prompts appear after entering required keys.

View 8 Replies View Related

Programming :: Displaying Particular Lines Via Grep ?

Apr 8, 2011

So For example I run this command:

Code:

But want to gerp / cut it in such a way that it only displays

Code:

Now the thing is that these 3 lines are not static.. there can be N number of lines there.. the only thing is that I want the command / output NOT to display the first line but the rest of the n lines ..

View 9 Replies View Related

Programming :: Displaying A Maze Generated By A C Program ?

Oct 8, 2010

I want to write a program in C which will generate a maze randomly and find the solution for it ..

The idea behind is in [url]

How the 16 bit integer is stored in a variable...Earlier I wrote a program on trees and displayed it using dotty...Is there any such tool to display a maze...I am using ubuntu 10.04

View 1 Replies View Related

Programming :: Java Applet And Displaying Text

Mar 13, 2010

Im having various problems with the graphic printing features for applets.

In this immediate applet, when I print and update the previous line bleeds through the next line. I tried printing a series of spaces to clear the first text, but it doesn�t work.

Code:

View 8 Replies View Related

Programming :: Displaying I/O Possible When Reading Data From The Serial Port?

Aug 31, 2009

I have got a problem while reading from the serial port. I'm working on iMX-31 board and Eclipse IDE. Whenever I'm trying to read any data through the serial port, it's displaying I/O Possible and the application is being terminated. After reading I'm trying to write this data on a file. Here are the excerpts from the code:

# int main()
{
if (openport()<0)

[code]...

View 7 Replies View Related

Programming :: Redirect The Output To Multiple Files Without Displaying It To The Screen?

Oct 26, 2010

To redirect standard output to multiple files:

Code:

echo Test | tee file1 file2

My problem is that the word "Test" still displays to the screen? I want same effect as:

Code:

echo Test > file1

but with multiple file redirection.

View 3 Replies View Related

Programming :: Displaying The Contents Of Buffers In A Protected And Non-protected Critical Section?

Nov 19, 2010

I have this project for my operating systems class and I have put together the basic flow chart to aid me in writing the program. I know how to use pipes as a buffer to hold info. I know how to create a binary semaphore. But what I dont know is this:

How to "use a delay adjustment parameter K in the critical section to adjust the speed of the display process to show that without semaphore protection the displayed contents of the buffer are randomly interleaved."

First off, I am definitely not asking anyone to give me the solution. But I do need some guidance. So I figure there will be an if statement with two options:

1. If true, use semaphore protection to enter/exit critical section

2. If false, no semaphore protection -- this is where the contents of the buffer should be interleaved.

Now does that mean that as each child process enters the non-protected critical section, it should "sleep" for a randomized time? I mean, will this allow my output to be interleaved?

So lets say my command line looks like this:

what happens to the 100? Is it randomized using rand and srand and passed as a parameter to sleep() inside the critcal section?

View 5 Replies View Related

Programming :: Implement A System Call For Displaying The System Statistics

Nov 6, 2010

I have been assigned to implement a system call that report the system statistics over all memory which are

Total Pages in Active LRU list
Total Pages in Inactive LRU List

View 1 Replies View Related

Programming :: Displaying Process Id In Shell Script But There Is No Such Process?

Nov 9, 2010

I have a shell script to identify whether the process is running or not. If the process is not running, then I execute another script file to run my application. Below is my script and saved this script as monitorprocess.sh Code: #!/bin/bash

result=$(ps -ef | grep -v grep | grep "applicationname.sh" | awk '{print $2}')
echo $result
if [ "$result" == "" ];

[code]...

View 4 Replies View Related

Ubuntu :: Displaying Too Many Hardrives ?

Jan 9, 2010

I have two hard drives in my compy. One is 500 gb and the other is ~40 gb. I tried to install ubuntu on the 40 gb one because the 500 gb one is starting to die. When I use a live cd to install and partition the harddrive.

It shows I have 3:

/dev/sdb] and /dev/mapper/nvidia_fhidaeja are physically the same drive but appear as two, independent but equal drives.I kinda just ignore it and move on. I install ubuntu and try to boot and I receive an error saying that grub can't be found. I install and repeat two more times and get the same message. I'm thinking the the "extra" drive has something to do with it, but I'm not sure. I've tried reformatting it and resetting bios but nothing seems to work.

View 7 Replies View Related

Ubuntu :: Monitor Not Displaying GUI ?

Feb 3, 2010

I've just installed Ubuntu 9.10 64 bit using Unetbootin, and I've managed to get into command line Ubuntu fine. I installed gnome (I think gnome, the command was "sudo apt-get install ubuntu-desktop"), typed "startx", and my monitor instantly went to a screen saying "NO SUPPORT". I rebooted, and this time a black screen with a white, low-resolution Ubuntu logo appeared for a few seconds, before "NO SUPPORT" appeared again. My graphics card is an ATI Radeon X1950XT AGP, and my "monitor" is a TV taking HDMI input through an adapter cable from a DVI out, if either of those pieces of info is useful. I'm now back in command line Ubuntu having booted into recovery mode, and I'm using a text-only browser for the first time.

View 5 Replies View Related

Ubuntu Installation :: 10.10 X64 Not Displaying?

Dec 15, 2010

I have run into an issue trying to install Ubuntu on my desktop. I am trying to install Ubuntu along side of Windows 7, but on a separate drive. When I chose the option to install on an entire drive, the installation worked. However, when I choose Ubuntu from GRUB, nothing displays. The same result happens for the recovery mode (Windows works fine).

View 9 Replies View Related

General :: Ls: Displaying The Whole Path?

Jun 7, 2010

GNU/linux kernel 2.6, slackware 12.0

Can ls display the whole path of a file? Suppose I have /media/cdrom1/*. So I want the output of ls to be

/media/cdrom1/file1
/media/cdrom2/file2
..................
/media/cdrom2/fileN

View 12 Replies View Related

General :: NAM Window Not Displaying In NS2

Oct 10, 2010

I am working on ns2 for my new project. I have successfully installed ns2 on fedora 8 but whenever I try to run in wireless example it does not display the scenario in nam window. It works with wired but not with wireless. It also create nam trace file but does not show anything. I also tried to run Marc Greis tutorial wireless ex but same problem continue.

View 7 Replies View Related

Software :: Window Not Displaying Anything

Jun 8, 2010

I'm running Linux Fedora 12 here and I launched a script to create a profile and it launched successfully. Now the problem is, after the creation of the profile its suppose to launch "first step" but now this windows appears blank and when i move the cursor around it picking the links..

View 1 Replies View Related

Red Hat :: Displaying All SAN Paths To Disks?

Jan 25, 2011

I'm a storage engineer by trade and have mapped a RHEL 4 server, several LUNs. I've mapped each (HBA Initiator) 4 times to seperate fibre channel ports on a storage array.Is there a RH command to see the device mapped 4 times to the target. I would expect to see something in the output that has the subsystems WWN, such as -

... 50060F9004563210
... 50060F9004563220
... 50060F9004563230
... 50060F9004563240

View 3 Replies View Related

Fedora Installation :: Grub Not Displaying ?

May 23, 2009

I've just installed Fedora10 from the live cd.

My setup is as follows:
Hard disk 1 - Dedicated to XP(160Gb) - Not used at all during installation!
Hard disk 2 - Used entirely for Fedora (250Gb)

I used the "Delete all partitions and create default layout" option.

Hard disk 2 was the only drive ticked to be used for this installation.

Hard disk 2 was selected as the drive to boot from.

On the next menu I put the bootloader in the primary partition of Hard disk 2 (NOT THE MBR OPTION) Then selected the default OS to load as Windows XP.

But now, when I start the computer, it justs loads XP like a single OS system. I never see any hint of GRUB running or attempting to run.

View 4 Replies View Related

Fedora :: GWC Icon Not Displaying In Window

Jul 8, 2010

I'm running Fedora 12 and have installed GWC(Gnome Wave Cleaner) from a tar.gz file. That was not without it's problems but lots of reading here and elsewhere taught me how to fix the makefile.in so that it would install properly. I even figured out how to make it add a gwc.desktop file to automatically add it to the applications menu. The app runs and works great but the icon in the upper left corner of the window is some generic icon for the Window Menu not the GWC icon. How do I fix this? I also added a file gwc.keys to /usr/share/mime-info in the hope that doing a right click on a .wav file would show GWC as an option in the 'Open With' list. This is also not working.

View 6 Replies View Related

OpenSUSE :: 11.4 KDE - Information Displaying On Screen

Jul 22, 2011

I am new to linux go easy please. I have about 200 machines with opensuse11.4 KDE on them, I would like certain information to stick to the background kinda like a widget type of thing that cannot be removed by a user (no admin rights) and it has to start on machine boot up and also these pcs are continually moving to different spots in our building but on the same network so idk if that changes anything with configuring the ip address.... the only things that need to be visible are as follows:

Host name
User name
IP address
domain

So basically widgets are useless to me, unless somebody knows how to configure these the way I need them or maybe there is something better then widgets. I came here to get the right answer from all you geniuses out there instead of trying to hop around on google and whatnot. Let me know what my options are and how I can roll this out on 200 PC efficiently.

View 9 Replies View Related

General :: Displaying Text On /dev/tty1?

May 3, 2011

I have a server laptop sitting around at home which is a pretty bland server, on which I generally leave the lid open and there is a login prompt always displayed.

However, I'd love to be able to display useful information on /dev/tty1 so whilst the server is just sitting there, rather than displaying a login prompt on the monitor, it could now display, for example, the current time and weather forecast for the day. Or something along those lines.

View 2 Replies View Related

Ubuntu :: OpenOffice Not Displaying Characters ?

Feb 15, 2010

I have a problem when opening documents in OpenOffice write, it doesn't display the characters for certain menu options - just a series of squares instead. It does this in other OpenOffice applications as well.

View 2 Replies View Related

Ubuntu :: /dev/sdc1 Displaying / Contents After 1 Day?

May 11, 2010

I was running 9.10-64, upgraded from 9.04 on a 160GB separate boot drive with a 1TB drive for storage. I had mdadm software RAID on 3 500GB drives. I copied off the contents of the md0 RAID device, formatted from ext3 to ext4, then copied it all back. I operated for several weeks this way with enhanced performance and no issues.note: All drives are on MB SATA-II.I wiped out everything and reloaded the 160GB drive with 10.04-64. I removed dmraid and set up mdadm as before with no immediate problems.

The next day, when I pulled up the contents of the 1TB drive (mapped to /1000), it displayed the contents of the root instead. Curious, I attempted to tunnel down to the /1000 folder from within its own listing of /, and saw no files listed. I proceeded to delete the files in the /1000 folder, whereupon I found that my system became unstable. I must have somehow been deleting files from the root itself.I reloaded again. To check if the SATA connector to the 1TB drive may be somehow suddenly faulty, I reordered the connectors and set up the boot priority in the BIOS to match the new configuration. The next morning, I was once again able to see the contents of / when ls'ing /1000. I carefully checked the entry in fstab, the fdisk -l output, and made sure that the directory wasn't somehow showing as a link.

For the next attempt I decided to take ext4 and mdadm completely out of the equation, hoping it was a bug with some combination of the two under the new kernel or something else which could be corrected by replacing the software RAID with a physical controller at a later date. Instead of RAID, I simply formatted each of the 500's as ext3 and mapped them to /500-1 through /500-3 respectively. However, after a day of normal operation, I am now able to see the contents of / when I ls /500-3. The other 4 drives appear to continue operating normally.I have been unable to pull up a similar post prior to creating this one. Perhaps I don't know how to properly search for this issue. If anyone has seen something similar, please link me to the solution.

View 2 Replies View Related

Ubuntu :: Evolution Not Displaying All Of Email?

Jun 18, 2010

I get a lot of email from different yahoogroups, but am having a bit of trouble in one group.

Every so often I'll get a message that is written in rich text and sent from the group's web post feature, but only half of it is displayed. If I check the message source the entire message is there, and if I change Evolutions settings to plain instead of HTML then the entire message is there.

The weird thing is it only seems to be the messages from one particular poster that is being cut off.

It'd be nice if I could stick with HTML and Evolution.

View 5 Replies View Related

Ubuntu :: Localhost Sites Not Displaying Right?

Sep 15, 2010

My local server isn't displaying images or proper css for my web pages. The pages display just fine on the webserver, but locally no images show, most of the css declarations aren't there and some of the php includes won't show on the page either. It's as if it's 10% working. All the files are in the right place. I changed directory permissions and tried restarting apache but that didn't help.

View 6 Replies View Related

Ubuntu :: Directory Not Displaying In Web Browser?

Nov 16, 2010

I have a LAMP environment on Ubuntu 9.04 desktop. I created a directory in /home/user that I use for all my development work called /projects.

I am able to access this directory via localhost/projects as the URI in my web browser; I see a listing of all the separate directories and I am able to click on each directory and see its contents.

Parent Directory
Site-Structure/ 30-Aug-2010 11:39
builds/ 03-Sep-2010 00:02
d6/ 12-Nov-2010 13:25
d7/ 31-Oct-2010 17:44

[Code]....

I have default, default-ssl and projects in my /etc/apache2/sites-available directory. I haven't changed these files since I first created them. I haven't changed the permissions on any of the directories within /home/user/projects since I first set this up.

What can I do to access this directory from the address bar of a browser again?

View 4 Replies View Related

Ubuntu :: CPU Usage At 100%, Displaying Extra CPU?

Nov 26, 2010

I'm relatively new with Ubuntu- but I'm pretty experienced otherwise with computers. I just installed Ubuntu on my Intel machine and it seemed to be running a little slow so I checked the System Monitor and found that there were 2 CPU's being displayed (I only have 1) and that one or both were maxed out at 100%. What I have for hardware is one Intel Atom 1.6Ghz processor, with 2GB of ram. When I check what resources are running, none of them seem to be taking up that much memory (firefox being the most at 60mb).Any advice on what might be going on here? How is it displaying 2 CPU's when I only have one?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved