General :: Head Adds Chars To End Of Each Line (Red Hat Enterprise)

Apr 5, 2010

I wrote a bash-script that splits each of many .sql-files into two parts by some condition using head utlity. After that I execute all the scripts in sqlplus, and in one or two of them I get an error: SP2-0042: unknown command ")" - rest of line ignored. If I open the file with vi, I can see that in the end of each line there's a "^M", which is treated as a single character. If I delete this character placed before the closing parenthesis, the scripts executes without any errors. In the initial script opened by vi there's no such characters. Is it a problem with the head utility or with something else? Of course, I cannot grep these special chars.

View 13 Replies


ADVERTISEMENT

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 :: Sed Adds A Space Instead Of Tab At End Of Line

Jan 14, 2011

The objective is to read a file line by line, add a tab at end of each line and add a value(number) after the tab.

My script:

Code:

Report.tsv before running the script for the first time:

Code:

At the end of first run, each line of Report.tsv gets appended by a space instead of a tab. On the other hand each line of Report.tsv gets appended by tab at the end of second run onwards.

This was realized when Report.tsv was imported in open office spreadsheet. First set of appended values get merged into the original column (Strings) and the subsequent appended values fall in distinct columns.

View 12 Replies View Related

Programming :: Pad End Of Each Line With Spaces To = 80 Chars?

Apr 14, 2011

I've searched the forums and the google looking for a means to do this and haven't found anything I can use. I have a large file that looks like this:

Code:

18000034161828M850
18000034172676M850
98 093095

[code]...

I need to add spaces at the end of each line to ensure that every line has 80 chars before the carriage return. I was thinking something like this, but it doesn't do the right thing:

Code:

cat filename | sed -e 's/$/(bunch of spaces)/' | cut -c1-80 > filename2

I'm on fedora, so I can use awk, sed, bash, ksh, etc.

View 14 Replies View Related

General :: Change Command Line Based SUSE System Enterprise Server To Gnome?

Sep 6, 2009

I have a virtual machine with SUSE Linux Entperise 10 SP2 (I586) installed. However, the default setting is using command line based interface.

Is it possible to change it to be GNOME or KDE based interface ?

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 Change The Head Line / Title

Apr 1, 2010

I would like to be able to change the Head Line / Title to include the working "fixed, solved" or some thing similar, in bright green ot red, maybe blue

View 2 Replies View Related

OpenSUSE :: Error: Repoindex.xml[12] Opening And Ending Tag Mismatch: Meta Line 11 And Head

Apr 5, 2011

whenever I try to open my repo's I get the following error message

Code: There were errors while restoring the repository configuration.Parse error: repoindex.xml[12] Opening and ending tag mismatch: meta line 11 and head does any one know what that means...

View 9 Replies View Related

General :: Webpage Charset - Turkish Chars Changes

Aug 11, 2011

I have webpage its charset is 8859-9 and it was prepared in windows with char encoding ascii. From ftp access, I am opening it via gedit in ubuntu then turkish chars changes like (turkish ı became ý). What can I do to avoid this kind of stupid things?

View 2 Replies View Related

General :: Putting Function Key Chars In A File?

Sep 18, 2010

Years ago on AIX I used to create a file of key strokes, including function keys (mainly F3 and F12) into a file, and used that file as input to an INFORMIX program, to automated tasks, something like this:
fglgo myprogram.fgo <keystrokefile.txt

Now, I'm using Aubit language on GNU/Linux, and I'd like to do the same kind of thing, but I can't recall how I worked out the chars for the function keys, I'm using a different emulation (xterm), and I can't work out what characters to put in the key stroke file. My $TERM variable contains "xterm". If I type "infocmp", I get this:

Code:
# Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
am, bce, km, mc5i, mir, msgr, npc, xenl,
colors#8, cols#80, it#8, lines#24, pairs#64,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,

[Code]....

1. Is the above infocmp output the place I should get the information I need?

2. What chars do I need to put into my file to simulate me pressing F3 and F12?

3. Is there a way for me to put such chars in a file by just pressing those function keys (I tried a here document, but that doesn't work (it's as if the function keys are not even pressed)).

View 5 Replies View Related

General :: Getting Extended Ascii (chars > 127) To Work

Mar 4, 2011

I have an application where the client is written in Visual Studio (C#), run on PCs, and the server end has traditionally been SCO. We're now migrating to Linux. I can, for example, input "Test This" in a text box on the client, and when the server end is SCO, it is able to 'accept' the character sent to it from the client. When I try this same example on Linux, that character (hex D1) does not 'make it' from the client to the server.

The problem is not on the client, and I have verified that the telnet connection is in fact passing these extended characters, but they are not recognized properly by the Linux server.In researching this, I've played with setting the LANG environmental variable from LANG=en_US.UTF-8 to several of the other possible values found in /usr/lib/locale, for a european locale (the end user is actually in Spain), and these 'euro' characters are still not handled properly in my application.Would anyone be able to point me to any specific env variable settings, and/or anything else that would resolve this issue?

View 6 Replies View Related

General :: Vim: Command To Show All Non-printable Chars?

Dec 5, 2010

Suppose I'm editing a file with vim. The file, a text file, contains line terninators which are line feeds (LF= 0x0a). It could also contain horizontal tabs (HT= 0x09) and some more non-printable chars (in fact, it could be corrupt and contain anything). Will vim let me see the location within the text of those chars (chars = characters) and what each of them is? I know there are such things as hexdump and the like but it would be nice for me to stay within the vim session.

View 2 Replies View Related

General :: Finding A Script To Remove Lines Without Chars?

Dec 26, 2010

I have a text file that each contains either a domain or an IP, like this:

Code:

[me@server ~]# cat file1
122.foo.com
yahoo.com
23345229.com

[code]....

I want to remove all IPs in that file and keep others, so the result be like:

Code:

[me@server ~]# cat file2
122.foo.com
yahoo.com
23345229.com

[code]....

View 6 Replies View Related

General :: Configure X And Adds Fonts To Its Window System?

Aug 9, 2010

I'm having some difficulty to confgure the windows X manager...

I can't find /etc/X11/xorg.conf

I'm trying to do this in opensuse 11.1 and fedora 12

I tried to install in fedora yum install system-config-display but I think that isn't the best thing to do...

And can anyone tell me a distribution that use XFree 86.4.4.x?

Opense suse, Fedora and Ubuntu use X.org-X11 isn't it?

View 10 Replies View Related

General :: Allow Users Of Program To Choose Filenames With Unicode Chars?

Jun 9, 2011

I'm working with an embedded Linux (Montavista 5.0). I want to allow users of my program to choose filenames with Unicode chars like the German All Unicode chars are visible inside the program (dialogs, buttons,...) and I can write Unicode chars into files and read them. But it is not possible for me to create a file with an Unicode filename! I can't write such Unicode chars in the shell! I set my locals to "de_DE.utf8". locale charmap says UTF-8! But when I try

Every Unicode char is writte to the shell in this way with a leading The same happens when I write such chars from my program to the shell with printf!

View 1 Replies View Related

General :: .bashrc File Adds A Couple Of Tens Of Spaces To The Prompt?

Sep 3, 2010

I got myself a .bashrc file off the net. I checked it beforehand, didn't detect anything bad about it. One thing that's odd about it, is that several spaces are added to the terminal command line.Screenshot:Those spaces are not put there by me. The file can be found here: [URL]..

View 3 Replies View Related

General :: Cp Adds Exclamation Points When Copying Very Large Text Files?

Jul 13, 2009

For my research I have some very large files that are basically millions of lines of ten columns of numbers. These files can be up to 5 GB in size. Recently I noticed that when I made a copy of one of my files, some exclamation points appeared in it where there should not be any: in front of random numbers throughout the file. Making another copy of the file would result in exclamation points in front of different numbers in different parts of the file. Doing this many times has given me up to four exclamation points in different parts of the file. Sometimes the file copies just fine without producing any extraneous exclamation points.Additionally, I have occasionally seen a "^K" where there should be a newline (the data that should have been on the next line was instead on the previous line with a ^K in front of it) in copies that I have made of my files. I don't know if this is related or not.

View 7 Replies View Related

Red Hat / Fedora :: Applications Compiled For 4 Enterprise - Gcc3.4 - On 5 Enterprise - Gcc4.1

Apr 28, 2010

To run applications compiled for RedHat 4 Enterprise (gcc3.4) on RedHat 5 Enterprise (gcc4.1), what should I do?

View 4 Replies View Related

Ubuntu :: Bootup Error Messages "render Ring Head Not Reset To Zero Ctl 00000000 Head 02001000 Tail 00000000 Start 02001000"

Feb 3, 2011

So everytime I resume Ubuntu from hibernation, it remains black for a time then 2 messages on the screen appear for about 10 seconds before I can log-in:

Code: [ 0.556247] [drm:init_ring_common] *ERROR* render ring head not reset to zero ctl 00000000 head 02001000 tail 00000000 start 02001000 [ 0.556320] [drm:init_ring_common] *ERROR* render ring head forced to zero ctl 00000000 head 00000000 tail 00000000 start 02001000

View 3 Replies View Related

Red Hat :: Run Enterprise 5 In 4 Enterprise Compatibility Mode

Apr 27, 2010

To run applications compiled for RedHat 4 Enterprise (gcc3.4) on RedHat 5 Enterprise (gcc4.1), what should I do?

View 4 Replies View Related

General :: Different Sounds In Head Phone And Speaker?

Oct 6, 2010

Is it possible to play two songs, where one songs sound is directed to head phones and another's to speaker.

View 1 Replies View Related

General :: Using "uniq" And Ignore The First Chars Instead Of Words

May 18, 2010

i have a list of files in a folder. the list of files is displayed using:

now, i want to pipe that to uniq so it'll ignore the first 6 charactes before comparing. is it possible? or perhaps i need to use another command?

View 2 Replies View Related

General :: Shell Script That Adds Users Name To A File When The File Is Modified?

Mar 30, 2010

I need a shell script that will add the users name and date to a file when the user has modified the file, these files are within a group and only accessible to this group. But we need a way for people in the group to know who and when the file was last modified.

View 1 Replies View Related

General :: Add Some String In The Head Of A New Created File Automatically In VIM?

Jun 25, 2010

To be specified,what I want to do is:

if I create xxx.php,#!/usr/bin/env php will be the first line of the file
if I create xxx.py,#!/usr/bin/env python will be added first.

View 4 Replies View Related

General :: Switching Between Monitors In Dual-head Setup

Feb 16, 2011

I'm using gnome in a dual-head setup with individual desktops. Is there any way to "jump" to another monitor using the keyboard only? Now the only method I know is to move the mouse pointer to the another screen and click on something there. Can I do something like that without using the mouse?

View 3 Replies View Related

General :: TV Out/triple Head With Nvidia 9500GT On Ubuntu 10.04 X64 ?

Jul 11, 2011

I'm trying to get rid of my dedicated media center and connect my desktop to my TV instead. No matter what I change I get no picture at all on the TV when connected to the desktop. I already have two LCD monitors using nvidia's "TwinView" mode and I want the TV to just be an extension of this, at a lower resolution.

My system information is below, but note that anything in the tag " ### NEW {}" in the xorg.conf is my attempt at getting this to work, the rest was already there. Two LCD monitors are screens 0 and 1, the TV is screen 2.

Code:

View 1 Replies View Related

General :: How To Fullscreen Application Across Both Monitors Of Dual Head Display

Feb 3, 2011

I have two Ubuntu 10.4 machines (and Ubuntu continues to hide more and more xorg.conf config such that I no longer know where to find it). One is a laptop running dual headed - DP1 is the internal screen, and VGA1 is an external monitor; both are running at 1600x900. The other machine is a desktop running both VGA1 and HDMI1 (which is actually a display port with a DVI adapter) at 1600x900. So in both instances my desktop is 3200x900. I run a VNC server on the laptop and connect to it (via SSH tunnel) from the desktop - when I press the full screen hot key, I get a 1600x900 view of the remote machine on one monitor, and half of my local desktop on the other monitor - the "full screen" only expands to fill one local monitor.

Normally this is exactly what you want when you full screen a web browser, email client, or other application. I'm sure there's some X magic to make it clear what a full screen actually entails, and the vnc client application is just dutifully accepting what it's told. While I would like to keep the normal full screen behavior for regular applications, but when I'm VNCing to another 3200x900 machine, I'd really like full screen to stretch across both local displays. Resizing the window to be "close" isn't quite good enough since I still have local panels at the top and bottom of one display (though I can set them to autohide), plus the VNC client application window border (since it doesn't appear to respect -notitle).

Is there any good way to have X lie to a single application about the "full screen" size? Can I get it to lie to all applications? xrandr --noprimary appears to have no effect.

View 2 Replies View Related

General :: Dual Monitor Using Aticonfig Single Head & Splitter Cable

May 27, 2010

I am attempting to get a Dual Monitor Display using aticonfig (and/or manual editing my xorg.conf file). My graphics card (a Radeon HD 4350 with latest ati drivers ) has only a single output but I am using a splitter cable to connect it to two monitors.

I am want one monitor to be 1600x1200 and the second monitor to be 800x600.

This is the command I had tried to no avail.

aticonfig -fq --initial --dtop=horizontal,reverse --resolution=0,1600x1200,1280x1024,1024x768 --mode2=800x600

What am I missing? Should I be using this configuration utility? Or should I be trying to manual edit my xorg.config? All the information I have been able to find seems specific to Dual Head Displays.

EDIT: It occurs to me to post my edited xorg.conf file

Quote:

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"

[Code].....

View 2 Replies View Related

General :: Listing Files Recursively, Sorted By Time, Limited Head?

Mar 24, 2011

I'm trying to make a shell script that will list the 50 newest files in a directory with several subdirectories in. I've been trying with the find-command with no luck and now I've figured I should probably use ls. The problem is when I do "ls -lRt | head -50" it will do 1 directory at the time. It will not first make the full list and then sort it. This will display all items in first directory, sorted, then the newest directory will be sorted and displayed. So I figured I have to sort the whole process of ls before I limit the head. So this is where I am at now: ls -lRt | sort <something clever here> | head -50

Only doing a "|sort|" will sort it by name if I understand it right and I don't know how to solve it. Here's also my first attempt if that is of any interrest or help, this was limited by the change status time of files (so some lists got very large). These lists dit not get sorted by time and I could not find any way to do so.find $ftpDir -ctime $time -type f -print > $ftpFileLsAny help on this would be appreciated since I'm sort of stuck now. After reading manuals for all the options I can think of and still there's just a big blur in my head..

View 12 Replies View Related

Debian :: 6.0.1 Adds Any New Kernel?

Mar 21, 2011

I know that default kernel for Debian 6.0.0 is 2.6.32-5. Does Debian 6.0.1 add any new kernel compared to Debian 6.0.0?
Where can I find the related information?

View 4 Replies View Related







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