Programming :: Remove White Space, +, And -, By Awk

May 18, 2011

I have some data whose no certain pattern. Below is as an example.

20110101 1+1-0 1-1 1+1-2 8- 5 3 0 3 4 5 3 7 4
20110102 1+2-0+1-1-1+2-1+ 9 5 6 2 3 3 5 6 5 4
20110103 1-1-0+1 1 2 2 2+10 3 3 2 4 4 7 7 9 5
20110104 1+3-1 1 1+2-2-1-11+ 5 12 4 4 5 6 6 3 6
20110105 0 0 0 1-1-1-1+1 4+ 0 0 0 3 3 3 5 4 2
20110106 1+0+0 0+0+1 2 4+10- 5 2 0 2 2 4 7 32 7

I want to remove space, + and - mark so that I can get the below such data :

20110101 1 1 0 1 1 1 1 2 8 5 3 0 3 4 5 3 7 4
20110102 1 2 0 1 1 1 2 1 9 5 6 2 3 3 5 6 5 4
20110103 1 1 0 1 1 2 2 2 10 3 3 2 4 4 7 7 9 5
20110104 1 3 1 1 1 2 2 1 11 5 12 4 4 5 6 6 3 6
20110105 0 0 0 1 1 1 1 1 4 0 0 0 3 3 3 5 4 2
20110106 1 0 0 0 0 1 2 4 10 5 2 0 2 2 4 7 32 7

Is it possible by using awk?

View 7 Replies


ADVERTISEMENT

Programming :: Unix Command To Remove White Spaces?

Sep 18, 2010

Im using this unix command(in a php file) to remove a certain string and then remove the whitespace left by that string. Unofrtunately in many cases, the files get completely erased. Is there a workaround?

Code

<?php
$dir = "./";
$rmcode = `find $dir -name "*.php"

[cod3e]....

View 14 Replies View Related

Hardware :: Printer Prints White Space Very Slowly?

Feb 12, 2011

I have successfully gotten my Canon MX300 Printer to work with CUPS. The printer works great, but for some reason it prints out white lines incredibly slow. The printer acts as if it is printing out actual text, e.g. if I have half a page of empty space, it prints it line by line for some reason... Anyone know what may cause this? I know that CUPS is not ideal with all printers, but it did not do this at first actually.

View 2 Replies View Related

General :: Printf White Space - Words Splitting?

Jun 15, 2010

I am having trouble keeping the name together and the phone number together, I think due to the white space. I have tried "" and '' it doesn't seem to matter. So it may be my syntax? and does it matter how long the first and last names are.

me$ echo 'fstname lstname' '123 123-1234' | ./myscript
#myscript
read a b
printf "%-15s %20s
" $a $b >> my_phone_numbers
OUTPUT

fstnamelstname
123123-1234
insted of
fstname lstname
123 123-1234

I know its not an elegant script but I am still learning how some commands work.

View 2 Replies View Related

OpenSUSE :: How To Get Rid Of White Space / Make Document Actual Real Legal Size

May 7, 2010

I scanned a document with xsane and saved it as a pdf, the pdf shows up great but there is extra white space at the bottom of the document. how do i get rid of the white space and make the document the actual real legal size?

View 2 Replies View Related

Fedora :: Remove White Bar At Top While Using Firefox (or Any Other Window)

Aug 24, 2011

For the life of me I cant remember what this bar is called, but if you right click, it allows you to close the window, minimize or maximize it, etc.

I like black themes, and right now everything but that bar is black.

Is there any way to change that bar from white to black?

View 1 Replies View Related

Ubuntu :: Remove White Border From Thumbnails?

Jun 27, 2010

is there a way to remove this eyesore, this wasn't the case in Karmic.

View 1 Replies View Related

Programming :: Passing Data Between Kernel Space To User Space In Asynchronous Way

Dec 13, 2010

I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?

View 4 Replies View Related

Programming :: Function In Kernel Space Called Form User Space

Jul 7, 2009

I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.

But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..

Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.

View 2 Replies View Related

Programming :: Call Socket Prog Code Written In User Space From Kernel Space?

Jul 14, 2009

How to use execv from kernel space to call a user space program writtenfor socket prog.

I tried to write code for socket in kernel but its not working.

Socket code in kernel is also needed.

View 2 Replies View Related

Programming :: Signal From Kernel Space To User Space?

Jul 21, 2011

I have the following requirement in my module. The driver gets some data from the external device. After getting 1MB of data it has to send it to the user space application. What is the best thing to implement for this in driver.? Is it ok to implement like, after getting data, the driver will send a signal to the user space application. Then the user space application sends an ioctl to read the data. Is there any alternate, that the driver directly sends the data without the user space application asks for it.?

View 4 Replies View Related

General :: Remove The Swap Space Later On?

Jul 6, 2011

I have a rel 5.6 system that we just added more memory to.

1. What is the correct or best way to increase swap?
2. Can I remove the swap space later on?
3. How do you remove it when done?

Our rootvg only has 8G available to it and I want to be sure if i allocate anything out to it I can reclaim when done without having to rebuild the system.

We have to do a lot of data moves so we allocated extra memory to this VM system and now we need to increase swap. I did see several articles in google but they describe using a new swap partition, a swap file and increasing an existing swap space. I am still not sure what is the best way to go knowing this is a temp situation.

[Code]...

View 7 Replies View Related

Debian :: Delete Back Over White Spaces They Stay White Out?

Oct 10, 2010

here is what is in my file:

[code]...

i have xterminus installed. i also have a white block over the first letter in my username and when i begin typing, the 'block-type cursor' just leaves full white spaces behind and i cannot read my text at all. even when i delete back over the white spaces, they stay whited out.

View 4 Replies View Related

Debian Multimedia :: Gnome-terminal White-in-white When Using Compiz

Apr 5, 2011

I installed compiz on squeeze. I followed the steps on [url] , everything seems fine except my gnome-terminal shows me a white-in-white screen, seems like both the background and foreground are white, I tried to change the gnome-terminal profile, it doesn't work, after I disable compiz, gnome-terminal back to normal. I tried to install xterm, it can work, but it not easy to use for me, I still want to use gnome-terminal,

My laptop is lenovo Thinkpad T400. 01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3400 Series

View 1 Replies View Related

Programming :: Reading And Writing White Spaces To A File?

Dec 2, 2010

I am trying to read a file character wise and trying to write the same character to another file. In this process, I unable to read and write white spaces successfully to the new file. The script reads the white spaces but while writing the white space is lost. The section of the code, is given below. Please advice how can i read and retain the white space while writing to a new file.

Code:

if [ -s f_test.txt ] && [ -f f_test.txt ]; then
echo "File Exists !!"
while read -n1 char; do

[code]....

View 2 Replies View Related

Programming :: Change / LINK Text To Yellow , White , Red?

Apr 25, 2009

Can anyone tell me how to change the LINK text to yellow or white or red??
The page is ( http://www.multidistro.com ) code...

View 5 Replies View Related

Programming :: If Statement Regex Match For White Spaces?

Apr 8, 2011

I want to match for this string:

Code:

Content-Transfer-Encoding:[:space:]base64
Content-Disposition:[:space:]attachment;[:space:]filename="%variable%"

Both lines are new lines, so they won't be inline. Other than that, they are all constants, I want this regex match to be an if statement rather than returning match string. so if the $content variable contains some string that matches:

Code:

if `sed "//p"` ;

View 4 Replies View Related

Ubuntu :: Space On The HDD And Decided To Remove Mint?

Nov 26, 2010

I had a dual boot system with Ubuntu and Mint. I needed more space on the HDD and decided to remove Mint.This went well and I now only have Ubuntu on the HDD. The problem is that when I boot up I still get the selection to choose whether I want to boot with Ubuntu or with Mint. I now want to remove this option from the boot list so that I can boot directly into Ubuntu automatically.

View 2 Replies View Related

Ubuntu Installation :: Remove Add That Bit Of Space To New Distro

Jun 7, 2011

So this morning i booted Xubuntu in an effort to replace Fedora 15, basically just getting a feel for all sorts of different distros. although it was slightly more confusing that the others i've tried on install because i had to manually configure partitions, and prompt didn't give a description really of which was which, so i took a shot in the dark at which was fedora to overwrite, and hoped i didn't remove win7 so all went well, but it appears Fedora is still in my system, using roughly 50GB still, it won't boot. but it is in the boot menu, and i can see it from Xubuntu. Can i remove this to add that bit of space to my new distro? or would i have to reinstall xubuntu Seems to be mostly just old folders and such, but it's being shown as a device. I don't see it in Gparted i don't think.

View 9 Replies View Related

Ubuntu :: Remove Unused Space From Partition?

Jun 14, 2011

I'm trying to Dual-boot Windows and Ubuntu. I have Ubuntu now. I'm trying to remove space from the Ubuntu partition(Active) but, it won't allow me to remove space from active partitions. I have 11GB Free according to GParted, yet during the installation it displays only 8MB Free. Oh, and I'm trying to install Windows XP through VirtualBox. Is that possible through the install CD? I've been searching and haven't seen anything about it.

View 5 Replies View Related

Ubuntu :: "locate" Or "updatedb" Be Set To Print File Names With White Space Properly Escaped?

May 23, 2010

Can "locate" or "updatedb" be set to print file names with white space properly escaped? For example, I want it to print, "/home/USER/My Files" and not, "/home/USER/My Files". I've googled around, read the man pages, checked the forum, and I'm still stuck.

View 2 Replies View Related

Ubuntu :: Update Kubuntu 11.04 - Error: "p, Li {white-space: Pre-wrap;} E: Dpkg Was Interrupted, You Must Manually Run 'dpkg --configure -a' To Correct The Problem"

Sep 1, 2011

I'm trying to update Kubuntu 11.04 here is my error: p, li {white-space: pre-wrap;} E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. here is what i have tried to fix it:

[Code]....

View 2 Replies View Related

Fedora Hardware :: Remove Unused Space From Vg LVM2?

Nov 23, 2009

This is my situation: on a LVM2 partition, i have shrink a logical volume to free new space for a new partition.

My system-config-lvm screen: http://forums.fedoraforum.org/attach...1&d=1258988216 code...

View 9 Replies View Related

General :: Can't Remove A Pv From LVM It Shows No Space Left But Don't Have Any Data

May 28, 2010

I have a lvm with 5 disk, I've been doing some benchmarks on the file-system with this lvm know I would like to remove one pv from the volume, I've tried

Code:
# pvmove -v /dev/sde1
Finding volume group "test-vol"
No extents available for allocation
and also

[Code]....

View 5 Replies View Related

Software :: Remove Un-partitioned Space Completely From System?

Jan 13, 2011

I am running RHEL5 on VMWare Esxi, i JUST DELETED A 30 GB PARTITION, AND WANT THIS os TO STOP SEEING IT So I can use it for a new machine...How do I go about removing it from the RHEL VM??

View 4 Replies View Related

Fedora Installation :: Dual Boot With Vista - Remove One Of Them To Save Disk Space

Jan 15, 2009

I installed the live CD version of fedora (dual boot with vista) on my laptop. After I connected to the internet the updates downloaded and all went well. however when i restarted at the boot screen I found two instances of fedora such as

Fedora(2.6.27.9-159.fc10.i686)
Fedora(2.6.27.5-117.fc10.i686)
Other

The "other" is vista. I am wondering if this is OK or whether I have two fedora. If so i would like to remove one of them to save disk space.

View 5 Replies View Related

Installation :: Remove Ubuntu Including The Grub Screen And Free The Space Up On The Hard Disk?

Dec 1, 2010

I had Vista on my laptop and then started dual booting with windows.downloaded ubuntu today and installed but just not feeling it. i have looked in add remove programs but its not there. can someone point me in the right direction. How do i remove ubuntu including the grub screen and free the space up on the hard disk because i'm missing 25gb.

View 4 Replies View Related

General :: Division Of Logical Memory Space In To User Space And Kernel Space

Jan 4, 2010

Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?

1. How can we change it? (just changing value of PAGE_OFFSET is okay?)

2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?

View 2 Replies View Related

Ubuntu Installation :: Remove The Installation And Get The Disk Space Back?

Sep 1, 2011

I have never had to do this before But I'm giving my laptop to my mother when my new one arrives and I need to remove the ubuntu installation and get the disk space back.

A few months ago the install stopped working. I can't remember what the error said... and tbh I can't be bothered to reboot twice to read it, but it has to be removed now anyways.

Had a look in windows to see if I can do anything in the disk manager, but it appears I can't. Oh wise ones, please, which path should one take?

View 3 Replies View Related

Programming :: Finding Available Space In A Volume?

Nov 15, 2010

Given the name of a mounted volume (e.g., /mnt/vol), how would I determine its capacity and available space in C? I've been googling for a while now and nothing jumps out as the solution. I can use getmntent() to get the name of the actual partition that is associated with the mount point, e.g. /dev/sda2, but I can't figure out how to find the capacity of the volume nor how much space is remaining, such as what the df command shows. Is there an ioctl defined to get this information or some other system call?

View 1 Replies View Related







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