Hi Feherke,
No typos.
The first new occurrence of a number = 1
Subsequent occurrences of the same number = 2
The last occurrence of the number = 3
Hope that makes sense - what I am struggling with is being able to compare the current line with the previous one so I know when the number changes...
Hi,
I have a simple input file:
1
1
1
1
2
2
2
2
3
3
3
I need to create an additional column in the file which is based on the first columns numbers:
1 1
1 2
1 2
1 3
2 1
2 2
2 2
2 3
3 1
3 2
3 3
etc
Any ideas would be great!
Many Thanks
Hi All,
Anybody know of a command (or simple script) to decimate a file by a user specified amount?
e.g. I have a file that has 24 million lines and I only want to keep every 10th line.
Many Thanks,
James
I have nothing in /vol/dev/dsk
/vol/dev exists but not the dsk directory...
ls -l /dev/dsk/c* | grep stor gives me:
lrwxrwxrwx 1 root root 55 Apr 11 08:25 /dev/dsk/c3t0d0s0 -> ../../devices/pci@8,700000/usb@5,3/storage@1/disk@0,0:a
lrwxrwxrwx 1 root root 55 Apr 11...
Here we go:
c3t0d0 Soft Errors: 1 Hard Errors: 0 Transport Errors: 0
Vendor: Generic Product: Flash Di Revision: Serial No: Size: 0.07GB <65536000 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 1 Predictive Failure Analysis: 0
c1t1d0...
Good question - i haven't installed anything extra on the machine - i assumed that because the messages file was spilling out with lots of USB related messages, and it seemed to recognize the device, that they were already installed.
How do i check this?
Cheers
Thanks,
I tried the suggestions but got the same results as before - do you think that i need to stop/start the volume manager with the device attached?
Hi All,
I am trying to mount a USB flash drive onto a Sunblade running Solaris 8
In /var/adm/messages it appears that the device is being picked up but i am getting an error:
"corrupt label - wrong magic number"
Doing the following appears to list the device correctly:
> ls -l...
Thanks feherke,
The sed command fails - "Unrecognized command: 3~3p" - any ideas why?
I can get the awk to work but only using "nawk" so thanks for that.
Cheers!
Hi,
I need to write a script that decimates a file by a user specified amount.
e.g. Keep every 5th, 10th, 30th line etc.
Is there a standard unix command that i can use to do this or should i be looking at sed or awk?
Any ideas would be great.
Cheers!
Thanks for the help
Are you sure SWAP has to be primary - can it not be a logical partition?
Is it possible to "move" a partition from primary to logical - i have used Acronis Disk director recently and that has a move option but this feels like a dangerous thing to do!
Cheers
Hi All,
I am trying to install RHEL WS3 on a machine that is already dual booted with XP and RH 7.3
This is what i get when i choose Manual partition mode:
/dev/hda1 ntfs
/dev/hda2 ext3 (/boot) # Used for RH 7.3
/dev/hda3 swap
/dev/hda4 Extended
/dev/hda5 ext3 (/) # Used for RH 7.3
Free...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.