General :: How Can I Do To Make Less Not To Do Line Wraparound

Nov 5, 2010

How can I do to make less not to do line wraparound? That is, if there is a line exceeding 80 chars, I want to see only the first 80 ones. Of course, if I wish, I would afterwards be able to see the rest of the line by pressing the End key.

View 4 Replies


ADVERTISEMENT

General :: Make Mouse Wheel Scroll ONE Line At A Time In Emacs?

Jun 16, 2010

My mouse wheel scrolls 3 lines at a time !

I tried this, it didn't succeed.

View 14 Replies View Related

General :: Using Sed To Extrac Data From Xml Tags And Make The Result Displayed In One Line?

Apr 18, 2011

I have an xml file that is similar to this.Suppose that this file name is Example.

<PMID>10605436</PMID>
<Year>2000</Year>
<ArticleTitle>Steroids</ArticleTitle>

[code]...

View 5 Replies View Related

General :: Use Command Line And Wmctrl To Make A Window Larger Than The Screen To Get A Huge Screenshot?

Jan 24, 2011

I use a program which makes a large image which I have to scroll to view. The program has no way to save the image, and I have no access to the source to modify it. The only way I have to get the image from the program is by screenshot. My goal is to save the full size image without having to piece together individual screenshots. I'm using this script to try taking a screenshot:

#!/bin/bash
window=$(wmctrl -l | grep "Program$" | awk '{print $1}')
wmctrl -v -i -r $window -e '0,0,0,6030,5828'
wmctrl -i -a $window
import -window $window ~/Desktop/screenshot.png

This uses wmctrl to get the window id ($window) for a window named "Program". It then tries to resize the window to the desired dimensions. It uses imagemagick (import) to save a screenshot.png on the user's Desktop. All of this works except the resize step. I can resize the window using wmctrl -r -e, but sizes greater than the screen size don't work. I'm using Ubuntu 10.04 and the Gnome Desktop. I run two monitors, but I've tried this with one of them disabled. Is there a way to resize the window larger than my screen to get a huge screenshot?

Part II: I tried using xrandr to set up screen panning, so as to have a bigger desktop than my monitor. xrandr --output LVDS --panning 2600x2500 This command makes the laptop screen pan over a 2600x2500 size desktop, even though it can only show 1440x900 at one time. To turn off the panning, I can use a similar command to set total size and with zeroes for the panning section. This gives me back my original laptop display behavior. xrandr --fb 1440x900 --output LVDS --panning 0x0 This is all done with xrandr, and does not require any Xorg.conf changes (my Ubuntu system doesn't even have an Xorg.conf).

My video card seems to only allow about 6.5 million pixels, even though the maximum dimensions are 8192x8192. That maximum seems to be the maximum for either dimension, but there is a limit to how many pixels can be drawn, which is the width multiplied by the height. Once I did the screen resize, I tried my script again and got a screenshot. The screenshot however is totally scrambled. I'm not sure if it's unable to take a screenshot of an off-screen window or if it is unable to handle the large dimensions of the window. With the panning display, the window should think it is visible, and the window manager should think it is on-screen. So there is a pixel buffer somewhere with those pixels in it, so there should be a way to get a screenshot.

View 1 Replies View Related

General :: Using The Command Line Can Detect Wireless Card And Make It Work Under SUSE Enterprise Desktop?

Jan 26, 2010

How, using the command line can I detect my wireless card and make it work under SUSE Enterprise Desktop? The wireless card works in Win XP.

View 8 Replies View Related

Ubuntu :: How To Make Command Line Auto Run On Boot Up

Dec 20, 2010

In dealing with the Nvidia Powermizer, I have to set it to "Prefer Maximum Power" mode from adaptive mode in order that I can avoid laggy in using my GUI. However, it doesn't save this setting so I have to manually tweak it everytime........

Someone on the web taught me to use the following command line:
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1
running it in the terminal it will set to the mode I want.

Would I be able to make my computer run the above command in terminal everytime it starts? I tried to put the command in the start up applications and it seems not working.

View 5 Replies View Related

Security :: Make The Command Line You Type Invisible

Jul 2, 2010

To hide the user input to be displayed on screen, use the terminal line setting command stty -echo, whatever the user enters after this command will not be displayed in the screen. to make the input characters get displayed on the screen use stty echo.

View 1 Replies View Related

Programming :: Sed - Match One Line Make A Substitution A Few Lines Down?

Jun 6, 2011

I need a substitution of a particular string (StringA) with another string (StringB). However, there may be more than one occurrence of StringA within the file, but only one instance needs to be changed, which is why I'm trying to be sure of it's positioning against something I know will be unique in the file, and will always have the same distance from the string to be replaced. So, I intend to match on a string (StringC) above the string to be substituted and then have sed go to StringA below and replace with StringB.

So far, I have had some success with the following:

Code:

... but I can't help thinking that there *has* to be a cleaner way of doing it.

View 6 Replies View Related

General :: Make Error - Make[2]: *** No Rule To Make Target

Oct 7, 2010

I am getting an error as below.

How do I resolve the error: make[2]: *** No rule to make target `', needed by `mpg123'.

How can I resolve this error.

View 4 Replies View Related

General :: Create Cron Tab When DSL Line Down Set Automatically Restart The Network Service While DSL Line Up?

Oct 7, 2010

How to create cron tab when DSL line down set automatically restart the network service while DSL line up?

View 3 Replies View Related

General :: Getting The Line Of String From Previous Pipe Output By Line Number?

Feb 8, 2010

After running the following command, I get:

[root@yukiko /]# find / -iname .bashrc
/home/clamav/.bashrc
/home/vpopmail/.bashrc
/etc/skel/.bashrc
/root/.bashrc

But I would like to have a command that prints a specific line by supplying the command with the line number, for example:

[root@yukiko /]# find / -iname .bashrc | getline(2)
/home/vpopmail/.bashrc

Is there such a command on CentOS?

View 3 Replies View Related

General :: Script To Count # Of Chars Per Line - If Line Meets Certain Criteria - And Get Avg #?

Sep 11, 2009

I have several files with many lines something like this:

I'm trying to write a script that will count the number of characters per line that doesn't contain a ">" symbol and give me an average of those values. I have most of the script together but I can't figure out how to connect some of the steps.

Code:

View 3 Replies View Related

General :: Scripting - Feed An Input File Into An If Statement Line-by-line

Dec 23, 2009

I am trying to write a script that takes an input file ($FileName) and an intermediate file ($FileName.info) and removes lines from $FileName if the value in $2 of $FileName.info is <75.

I can't figure out how to feed only one line of the .info file to the if statement at a time so that it will perceive it as an integer instead of a list.

The error I am getting now is ./script.sh: line 6: [: : integer expression expected

Sample input $FileName

Code:

Code:

Code:

Script so far:

Code:

View 10 Replies View Related

General :: Parse A File And Print Each Line That Ends With Matching Pattern (if The Next Line Is Blank)

Aug 2, 2010

I've written a script to parse a file and print each line that ends with matching pattern, if the next line is blank. The pattern lines are the result of md5sum $i|sed 's/path///g' so that only md5 and filename appear. Here's what I'm using.

Quote:
for fline in `sed -n '/.*.ext$/p' file1`
do
if [ "`sed -n -e '/'"$fline"'/ {n; p;}' file1`" == "" ]
then
echo ""$fline" has no info" >>file2
fi
done
[Code]....

View 4 Replies View Related

CentOS 5 Server :: Installation - Make On Line And Host Website

Jan 14, 2011

I have installed centOS Server edition on my laptop and installed apache and mysql on server, i wanted to understand how can i make my server on line and host my website on my own server. I am using MTNL Broad band, and i have one static ip, How to make web server in centOS 5.5.

View 7 Replies View Related

General :: Command Line Way To View A Line Of A File With Context?

Feb 24, 2011

I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:

$ (something) -l 154 stuff.py
150: def foo(bar):
151: """

[code]....

View 5 Replies View Related

General :: Printing Command Line History Without Line Numbers?

Aug 22, 2011

How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt

View 1 Replies View Related

General :: Sort By Line Size (number Of Characters In A Line)?

Jan 8, 2010

I want to sort a number of lines based on their size:

data:
-------
12345678
87654321
1234

[code]....

Should output as:
-----------------
1
2
12
21

[code]....

But i'm gettings this with sort
----------------
1
12
123
1234

[code]....

Can we sort the above "data" text, based on "number of characters" instead of "character order"?

View 8 Replies View Related

General :: Appending To The Current Line In A File Instead Of Creating A New Line?

Apr 1, 2011

I am combining data from a couple different input files and creating an output file in a specific format. I notice that if I use the >> operator, information gets appended to a new line in my output file. This is useful, but if I'd like to append onto the CURRENT line, is there an easy way to do this? I've been googling around and see lots of complicated answers, nothing that suggests to me an easy way to do this. For example, if my output file looks like this:

b1a:] cat test
hello my name is
b1a:]

and I'd simply like to append "Bob", how can I do it? If I use

b1a:] echo Bob >> test
b1a:] cat test
b1a:] hello my name is
Bob
b1a:]

So what I would prefer is some command that would create the result:

hello my name is Bob

View 14 Replies View Related

General :: Match And Combine 2 Text Files Line By Line

Mar 21, 2011

This solution works but is slow with large files. I am looking for a faster solution.

The 2 files contain filenames, one of them has associated data I want to append to the other file's matching filenames

file1:

file2:

I append file2 by matching the unique_filenames and appending them with the tag data and some formatting

appended file2:


Here is the SLOW code

while read inputline.

View 9 Replies View Related

General :: Sed To Display The Pattern String - The Line Above It And The First Line Of That Para

Mar 30, 2011

I need to grep for a particular string and if found need to display the line containing that string, the line above that and also the first line of that paragraph.

Can this be done via sed.

Eg, My Paragraphs

OA connectA

Enclosure:

Interconnect Module #6 Status:

Here, if I grep for Critical, it should display the following

Similarly if I grep for Degraded, it should display

View 3 Replies View Related

Programming :: Write A Command Line Script To Make Symbolic Links?

Oct 20, 2010

I am trying to figure something out as part of something else I am going to do. I was just wondering the easiest and quickest way to run a loop at the Linux command line which will make x amount of symbolic links when I need them.

I am using Debian 5.

I figure its something as easy as ~# foreach statement, then I just do a loop with the command to make a sym link.

View 5 Replies View Related

Slackware :: Rxvt Or Any Other Console Doesn't Make A New Line At Edge Of Window

Aug 17, 2010

I have a slight problem. Whenever I type something in rxvt, and sometimes it's a loooong something, I end up having to make it span multiple lines, as do you, probably. Anyway, my problem is that if I'm in any console at all, (aside from the TTY console and such) and I try to go multiple lines, this is what happens:

Code:

[root@SectionI13] > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
After the first pass...

Code:

aaaaaaaectionI13] > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
And after the second pass...

Code:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa

Now, I'd be fine and dandy with this, if it wasn't so hard to figure out what I was typing after the first pass, because it's just plain hard to understand a command when there's the second half of it in front of the first half of it.

View 5 Replies View Related

General :: Script Which Read Line By Line /passwd Using While?

May 13, 2010

I have to do several scripts and I have no idea of how to do this one: Make a script that read line by line the passwd file and prints in console.Hope you understand couse my english isso bad as you can see.Our teacher told us something like this:#!/bin/bashwhile read line doecho $lineadone < dispositiveexit

View 9 Replies View Related

General :: Grep Lines Containing A Certain String PLUS The Line Following That Line?

Sep 1, 2009

I have a dataset (see example below) that I would like to go through and copy all lines containing a certain string ("LGIG") plus the line immediately following that line to a new file. I have no problem grepping lines containing the string LGIG but I'm lost how to translate that to line number and shift up one line number for each instance of that string.

Example input file:

[code].....

View 5 Replies View Related

General :: Replace Line With Another Line In Shell Script?

Feb 26, 2010

I have the file abc.txt

cat abc.txt This is a test file Nothing is new in this world

I want to replace "This is a test file" to "Text is replaced"

Code:
FindString='This is a test file'
ReplaceString='Text is replaced'
Findarray=(`echo $FindString | tr ' ' ' '`)

[Code]....

But this is not effective. how to replace entire line either using sed or awk or any other utility.

View 5 Replies View Related

General :: How To Delete A Line At Specific Line Number

Jun 15, 2010

I m writing a script to delete a line at particular location.

But i m unable to use variable for specifying line number.

For example.

Code:

works fine and deletes 7th line from my file

But

Code:

gives following error.

Code:

View 7 Replies View Related

General :: Xterm - Go Onto Next Line When End Of Current Line Is Reached?

Jan 7, 2010

I am using xterm and sometimes when typing long commands into a small window, the command extends beyond the end of the line. On my old uni setup, when this happens, the cursor moves to the line below and you can see what text you have typed above however on my slack 13 setup, it overwrites the current line so you cannot see what you have typed! How can I set xterm to move onto the next line instead of overtyping?

View 14 Replies View Related

Fedora Networking :: Make The Ethernet Connection By Hand In The Command Line Mode?

Apr 12, 2010

The GUI for network configuration of Fedora is marvellous such that the configuration is almost fool-proof. But how can I make the connection by hand in the command line mode? It goes okay except the very last step. When I disconnect the eth0 interface from the right-hand side of the desktop GUI, I tested how to bring it back by command line but I failed. When disconnected, the ifconfig still shows the eth0 interface, with just the ip address portion changed.

I tried "ifconfig eth0 192.168.1.xx" to give it an ip address but the connection is still down even if the ifconfig shows an ip address for the eth0 interface. Then I tried "/etc/init.d/network restart" and "ifup eth0" and also "route add defaut gw 192.168.1.1" but none of these could accomplish the same work as a single click on the GUI to connect. I am very curious about how to do it in the terminal.

View 1 Replies View Related

CentOS 5 :: Added Gnome And X To Command Line Only Install - How To Make X Start At Boot

Nov 5, 2009

I've got an install of CentOS 5.3 in a VM which was installed without X or Gnome.I've added X (yum groupinstall 'X Window System') and Gnome (yum groupinstall 'GNOME Desktop Environment) and can now run startx no problem.However on boot I get a command line login rather than the graphical login screen one normally gets if Gnome is included at install time.What do I need to do to get the graphical login after boot?

View 3 Replies View Related







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