General :: Implementing Logical Operators In Grep?

Dec 14, 2009

How can I implement logical operators in grep? I checked the man info and couldn't figure it out. For example, I'd like to display lines in file1.txt that contains word1 OR word2.
cat file1.txt | grep word1 OR word2

View 3 Replies


ADVERTISEMENT

General :: Using File Redirection Operators In Bash?

Sep 3, 2010

What's the difference between using > and >>? How can I use both < and > (redirection operators) in a single command?

View 2 Replies View Related

General :: How Different Operators Change Output Of Command

Sep 5, 2009

I was wondering about the differences between "$PWD" '$PWD' `$PWD`. Basically I just don't understand exactly how '' "" `` change the output of the command.

View 1 Replies View Related

OpenSUSE Hardware :: ERROR: Bad Logical Partition 6: Enlarged Logical Partitions Overlap

Aug 22, 2011

After fixing drive partition numbers, I got the following error from cfdisk: Code: FATAL ERROR: Bad logical partition 6: enlarged logical partitions overlap Press any key to exit cfdisk However, I can see all my partitions with fdisk and gparted, I can mount and use all of them.I used the following guide to fix the drive numbers order: Reorder partition drive numbers in linux | LinkedBits Does somebody know whet is cfdisks problem and how can I fix it?

View 6 Replies View Related

General :: Implementing The Command In C?

Sep 5, 2010

I have been giving the task of shell scripting in C++ for implementation of Secure command in my shell. The Secure command will prompt for the filename and the password (like *****) and can only be displayed when ls -secure and password is provided. For example

>> LS
File1 File2
>> Secure File1
Password:*****

[code].....

View 1 Replies View Related

General :: Implementing Konqurer In Suse 11.1?

Jun 25, 2011

connecct to net with Konqurer.

View 1 Replies View Related

General :: Implementing Vcp Protocol In Kernal Module

Oct 14, 2010

steps for implementing vcp protocol in linux kernal module

View 1 Replies View Related

General :: Implementing A Variable-length List Of Keywords In Mysql?

Sep 20, 2010

I'm having a hard time googling for answers because I keep using the word "keyword."

I've never really used any kind of database before, but I want to learn the basics, so I'm playing with it a little bit at work. What I want to do is make a database to hold information on various articles. For example, with columns for the title, author, and date. Those are all easy. The tricky part is that I'd also like to be able to label articles with keywords so I can search for certain topics.

Since there's no way to know ahead of time how many keywords, if any, each article might warrant, I'm not sure how to put this in database form. There's no variable-sized array data type. It seems sloppy to just list them all in a single VARCHAR column. Making several columns that may or may not be left null and putting one keyword in each seems wasteful.

View 2 Replies View Related

General :: Implementing Wireless Sensor Network In Omnet++ 4.1 Simulation Tool?

Oct 2, 2010

i m trying to implement wireless sensor network in omnet++ 4.1 simulation tool but that tool is not supported.so i m installing framework mixim 1.2 in omnet++ that support wireless and mobility feature.now i have problem that how to create sensor network in omnet++4.1 using mixim 1.2?if any body

View 2 Replies View Related

Programming :: Bash Background - & - With Control Operators -&&

Feb 11, 2009

I have a set of files to copy and decompress, and want to do these operations concurrently with a script.

Manually it would be something like:

Code:

The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.

My script is:

Code:

When I run it, bash gets angry with the following error:

Code:

So what is the proper syntax to accomplish this?

View 1 Replies View Related

Programming :: How Many Of PHP Functions And Operators Remembered To Code

Jun 7, 2011

So if you are a PHP-programmer (average one) and code for money, how many of funtions and operators of PHP should you remember by heart (in real life)? I was looking through php.net and man there are millions of tons of them!

View 9 Replies View Related

Ubuntu :: Read Not Allowing Operators In Shell Scripts

Dec 26, 2010

I'm trying to write a small application controlling spotify, running under wine, that I can run from my desktop computer and use via SSH on my mobile phone, and so far I've been quite successful. At least until just recently, when I tried to use the read command to read a single key-press on my phone, and use that input instead of having to type the number for item in the menu I've created. I tried to simply use the read command to silently listen to one key-press and output it to the variable opt. To do this I tried:

read -s -n1 opt

When I ran this in a shell-script this I got:

read: 1: Illegal option -s

Seeing this, I tried to remove the -s operator, which left me with:

read: 1: Illegal option -n

I decided to remove all operators and echo the variable opt, leaving me with:

read opt
echo "$opt"

Which worked as expected. It echoed the key that I had pressed. I moved over to my terminal window and tried the read command from there, and it did exactly what it should. It silently recorded one key-press to the variable opt.

why isn't read working with operators in shell scripts?

View 2 Replies View Related

Software :: Bash Syntax - While Loop With Multiple Comparison Operators

Apr 21, 2009

I'm trying to code the following WHILE loop in Bash:
While [string1 is non zero] and [string2 is non zero] and [counter < max]
Do
...
Done

I can't get the syntax right. I've tried:
Code:
while [ -n "$STRING1"] -a [ -n "$STRING2"] -a [$COUNTER -lt $MAX ]
But I get 'Too may arguments'

View 4 Replies View Related

Programming :: Input File - Grep Within Grep

Nov 22, 2010

I need to kind of grep within grep. My input file would be something like:

[Code]....

and I need to find the first occurrence of hello before MY PATTERN (hello 9008 in this case), so the output should be:

[Code]....

View 4 Replies View Related

General :: Uninstall Grub From Logical Partition

Dec 28, 2010

I'm multi-booting with Windows 7 x64 and (at least) Linux Mint. Because I hadn't yet made a backup of my MBR, when I installed Linux Mint on a logical partition, I told the installer to put GRUB on the partition instead of in the MBR. This turned out to be useless, as I need to use GRUB from a boot disk to get into the GRUB I installed. Before installing it in the MBR, I'd like to get it out of the partition, preferably without wiping and reinstalling Linux. I don't relish the prospect of going through two layers of GRUB when I want to boot Linux. How do I get it out, or what other options are available to me?

View 1 Replies View Related

General :: Cannot Create Logical Partitions Without Errors

Jan 14, 2010

I have run into a Gparted problem that I am not familiar with. I've never seen it before.

I cannot create logical partitions without errors or not at all. I have two choices:

1) not checking 'round to cylinders' - I will get an error* and it will not partition

2) check 'round to cylinders' - it will partition but I will also obtain 4MB of unallocated space (each time)

This applies to Primary partitions, too, I think. At least, #2 will happen.

Imho, this is ridiculous. Why would I retain 4MB of unallocated space? In other words, the two choices above are not choices.

The error message doesn't explain much if anything either. *"Unable to satisfy all constraints on the partition"

View 9 Replies View Related

General :: Encrypting Existing Logical Volumes

Jan 8, 2011

How would I go about encrypting my lvm2 logical volumes on Debian Squeeze? Is it possible without backing everything up to a different drive and restoring afterwards?

View 3 Replies View Related

General :: How To Know Which Logical Volume Owns A File

Jul 14, 2010

Hi. We have a cluster consisting of 10 logical volumes all part of one filesystem. Is there a way to know which logical volume owns a certain file/inode? I have tried what is suggested at this link, but the output is the filesystem and not a specific logical volume.

View 6 Replies View Related

General :: Why Are Logical Partitions Preferred Over Primary

May 9, 2011

So I noticed while using guided partitioning that most distro installers will attempt to create a logical partition for the root file system besides the swap and /boot on the HDD. Why is this the case? Why does the partition for root file system have to be logical and not primary?

View 10 Replies View Related

General :: List Filesystems That Are Using LVM Logical Volumes?

Jun 23, 2011

I've read the first 40% of the RHEL 5 Logical Volume Manager Administrator's Guide, but still have one outstanding, burning question.

During the installation of Centos 5.6, I set up LVM physical volumes, volume groups and logical volumes. I can list these using pvdisplay, vgdisplay and lvdisplay commands.

How would I list what filesystems I have that are using my logical volumes?

View 2 Replies View Related

General :: Know Maximum Number Of Logical Partition?

Sep 11, 2009

I'd just like to know the max number of logical partitions an extended partition can hold. Is that number different for IDE and SCSI hard drives?

View 11 Replies View Related

General :: Generating Logical Memory Addresses Of An Application?

Mar 15, 2010

Is there any tool for generating logical memory addresses accessed by any application in linux ?

View 2 Replies View Related

General :: Different Sizes In Data After Resizing Logical Volume?

Jul 7, 2010

I recently resized one of my Logical Volumes that contained 160MB data from 500MB to 6.5GB. After resizing it, I checked the size of the data via 'du -sh' and found that my data had reduced to 143MB.

Fortunately, I backed up the the 160MB of data on another partition before resizing the Logical Volume. I ran 'diff' on both directories holding the 160MB and 143MB, but there was no difference detected.

how come there is a 17MB difference after resizing?

In case you're wondering how I performed my resize, this is what i did:

e2fsck -f /dev/VolGroup01/LogVol00
lvextend -L +6G /dev/VolGroup01/LogVol00
resize2fs -p /dev/VolGroup01/LogVol00

View 5 Replies View Related

General :: Making A Logical NTFS Partition In RHEL5?

Aug 11, 2010

I have a RHEL 5 machine.I want to make a logical partition of free space but want to format it with NTFS file system..And have only a single OS (rhel).

View 1 Replies View Related

General :: Create A Logical Volume Of 18TB In Size?

Dec 1, 2010

Is it possible to create a logical volume of 18TB in size? I was able to create the volume group but I'm having issues with the logical volume.

View 6 Replies View Related

General :: Diffenrence Between Primary - Logical - Extended Partition ?

Jun 24, 2011

The difference between primary or logical and extended partition in disk management in redhat linux

View 1 Replies View Related

General :: Hard And Logical File System Connection?

Nov 4, 2010

How can a directory mount the hard drive? How can a list of files sitting on a hard drive that is not in RAM run your computer and then mount the physical device that stores the code that it is running? Obviously the CPU can access the hard drive before this so how does this massive abstraction make physical sense?I'm thinking that if this is abstracted to this extent so is the "/.../.../" path nomenclature as well. Is this just to change directories and or an environmental variable? Is the file really farther the more slashes that are in it?

View 14 Replies View Related

General :: Resizing Initially Installed Logical Volume?

Oct 26, 2010

Back in the day, I foolishly installed my Fedora server with the default logical volume layout on one physical volume. Knowing now that this is a huge waste of space (partition is large) I'd like to reduce the logical volume and somehow detach this now unused space and mount as a normal partition. Is this possible? Only 20GB of the 160GB has been used for the OS. Home partition is on a secondary disk.

View 9 Replies View Related

General :: Exact Process Of Booting From Logical Partition

Aug 2, 2009

I apologize if this has been asked a hundred times, but I searched through the threads and posts here and did not find an answer that helped me at all.What is the exact process of booting from a logical partition?
I have read several things, and all are confusing to me and I can't find a good answer.Here's what I know and an example:I've read this is easily possible.some things I've read said something about it being complex and that you have to chainload. Some things I've read said it's very easy, but it has something to do with booting from the extended partition. Others said, no you use the logical partition itself. I can't clear up what anyone is talking about..When using openSUSE 11.1, the Live CD and trying to install it. It will give me problems when trying to boot from a logical partition, not to mention I don't want to do something wrong and add data or anything where it shouldn't be. I don't know what I'm doing, at all, and I can't understand people's explanations of this.

When using openSUSE, you can choose (when configuring GRUB using the graphical installation) "boot from extended partition" and use "custom boot partition: sda(1,2,3,whatever)" and it will work. If you choose to boot from the logical partition only, and don't check "boot from extended partition", it will say "no operating system found" when booting. What exactly is happening here, I'm completely lost. Choosing "boot from extended partition" can't cause any problems of any kind, can it? What is the proper way of doing things in this situation, what is really happening?

View 14 Replies View Related

Programming :: Implement Left-associative Operators In Parser That Does Not Allow Left Recursion?

Jan 20, 2011

The first is about implementing function calls. The way I currently have it is that functions are called with a C++ std::vector of nodes as the parameters. How would I turn a comma-seperated list of expressions into a C++ vector in the grammar?Second, how do you implement left-associative operators in a parser that does not allow left recursion?

And third, what would be the best internal representation of integers? A C++ int seems simplest, but limited. Using GMP seems more versatile, but I'm afraid it might seriously slow down the interpreter compared to C++ ints.

View 3 Replies View Related







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