Search Results

Search: Posts Made By: sdanner
14,644
Posted By sdanner
Possibly another way ... depending on your reqs
cut -c1-5,10- filename

I did this with the following file:
abcd abcd1
abcd abcd14
abcd abcd127

and got
abcd 1
abcd 14
abcd 127
Forum: Solaris 03-29-2010
21,630
Posted By sdanner
Elph, I was playing around with Solaris 10...
Elph,

I was playing around with Solaris 10 and came up with this:

ls -E $FNAME | awk '{print substr($6,1,4) substr($6,6,2) substr($6,9,3);}'

not sure if it works with Solaris 9, but you can...
3,224
Posted By sdanner
deleted.
deleted.
3,224
Posted By sdanner
so... in your example, for just GG... column...
so... in your example, for just GG...
column 1 GG would be 1
column 4 GG would be -1
column 6 GG would be 1
but...
a) column 7 GG would be... what ? there is no 1 or -1 ?
b) column 5...
1,947
Posted By sdanner
corrected script, corrections made per C. Johnson
To: cfajohnson... thanks for taking the time to fix this up. I'll try and keep your advice in mind next time. ( Guess I should get your book, huh? :>D )

To: aliahsan81... just for...
1,517
Posted By sdanner
solution using sed
Here is one way, using sed:

#!/bin/ksh

pfile="pmonfile.dat"
tmpfile="pmonfile.tmp"

sed -e '1,$s/_stdby$//g' pmonfile.dat > $tmpfile

mv -f $tmpfile $pfile


how's that?
1,947
Posted By sdanner
Is this what you looking for ?
The file2 layout that you show does not reflect what you stated as "append" the name to the file, but I'm assuming append (meaning at the end of the file). I'm also assuming that each name is on a...
1,899
Posted By sdanner
I'm assuming you are looking for a perl script,...
I'm assuming you are looking for a perl script, considering the .pl extension. Here is what I came up with, using inner.pl script file as an example of the perl script being called:

script file...
27,183
Posted By sdanner
ping script on Solaris 8
I don't know exactly what your OS is, but I tried the following script below on a Solaris 8 system. To ensure it would work, I had to a) add as the first line #!/bin/sh (because I run c-shell on...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 01:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy