Search Results

Search: Posts Made By: Festus Hagen
1,902
Posted By Festus Hagen
RudiC, Absolute sweet perfection ... Much...
RudiC,

Absolute sweet perfection ... Much Thanks!

Never even thought of using expansion, I was way over thinking it.
I have not dissected it yet to fully understand, I will.

Took me a...
1,902
Posted By Festus Hagen
Was I not clear. Ruby and AWK are out ......
Was I not clear.

Ruby and AWK are out ... not available.
That is the reason for my second line in original post. sh/csh!
sed is available.

I am not Reading or Processing a file ...

A...
1,902
Posted By Festus Hagen
Determine if variable is the Server component of UNC
Hi all,

Using sh/csh, unfortunately shell scripts are not my strong suit.

Trying to write a script that gets called from a program for pre-processing.
The program passes individual components...
2,099
Posted By Festus Hagen
Not much of a speed thing, however. my...
Not much of a speed thing, however.

my $terminator = $/;
undef $/;
$mult = <MULT>;
$/ = $terminator;
According 'man perlvar' this is a no no...
The proper method would be to keep it local($/)...
2,845
Posted By Festus Hagen
A couple example command line processors of...
A couple example command line processors of different methods...

The method I prefer... I believe it's originator is cfajohnson ... Thanks!
I have formated mine vertically though.

args=
while...
6,462
Posted By Festus Hagen
How I do it, Don't know how correct it is though....
How I do it, Don't know how correct it is though. Thoughts???

cmdline='/usr/sbin/rsct/bin/rmcd -a IBM.LPCommands -r'
path=${cmdline%/*} # Path
tmp=${cmdline##*/} # Filename & Arguments...
4,152
Posted By Festus Hagen
Hi all, Thanks for the responses ... I...
Hi all,

Thanks for the responses ...

I have accomplished this with the following methods, however I have gone a step further with a third method...

Hopefully they help the next one in need!...
4,818
Posted By Festus Hagen
You have two choices ... $ set Would have...
You have two choices ...
$ set
Would have shown you one ...

$ echo $pwd

Then there is the cmd:
$ pwd

-Enjoy
fh : )_~
2,295
Posted By Festus Hagen
You can edit a file inplace with sed, without...
You can edit a file inplace with sed, without redirection with the '-i' switch if you have it...


sed -i~ 's/bbb/ddd/' 'file'


-Enjoy
fh : )_~
4,152
Posted By Festus Hagen
Delete block of text in one file based on list in another file
Hi all

I currently use the following in shell.

#!/bin/sh

while read LINE
do
perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile"
done < "listfile"
NOTE the single...
3,857
Posted By Festus Hagen
Follow up for those that care! I was unable...
Follow up for those that care!

I was unable to get sed to quit adding lines to the file so I looked other places and wound up using perl.

The following does the job just fine!

...
9,008
Posted By Festus Hagen
A search would have set you right up! ...
A search would have set you right up!

unix2dos

-Enjoy
fh : )_~
2,630
Posted By Festus Hagen
What dos??? Must be one of the newer M$lop......
What dos???
Must be one of the newer M$lop... xp|>

That should not happen ... That is the correct method.
The .??? signifies that there must be 3 characters following a dot!

If the .0?? or...
2,630
Posted By Festus Hagen
del access.??? -Enjoy fh : )_~
del access.???


-Enjoy
fh : )_~
10,224
Posted By Festus Hagen
I believe you need to run it through 'dos2unix'! ...
I believe you need to run it through 'dos2unix'!

-Enjoy
fh : )_~
3,857
Posted By Festus Hagen
deleting text records with sed (sed paragraphs)
Hi all,

First off, Thank you all for the knowledge I have gleaned from this site!

Deleting Records from a text file... sed paragraphs

The following code works nearly perfect, however each...
9,872
Posted By Festus Hagen
Try this, Thanks goto Jimbo, I have modded it...
Try this, Thanks goto Jimbo, I have modded it slightly.


#!/bin/sh

ls -ld "${1:-"*"}" | awk 'BEGIN {
v["r1"]=400; v["w2"]=200; v["x3"]=100; v["s3"]=4100; v["S3"]=4000
v["r4"]=40 ; v["w5"]=20...
9,872
Posted By Festus Hagen
A quick search for octal permissions reveals your...
A quick search for octal permissions reveals your answer!

Display Permissions in Octal (https://www.unix.com/unix-dummies-questions-answers/100630-display-permissions-octal-format.html)

-Enjoy...
5,778
Posted By Festus Hagen
Understood ... Makes sense, Thank you! ...
Understood ... Makes sense, Thank you!


Yup, I understood this, wanted to ensure there was no other reason...
I typically use double quotes unless I know it needs single anyways.
If I'm...
5,778
Posted By Festus Hagen
scottn, Thank you, Obliviously I don't need to...
scottn, Thank you, Obliviously I don't need to say "It works"!, About basename, yup, you did miss something... the sed'ucation part!
This really is just for education with sed and RE's.

...
5,778
Posted By Festus Hagen
fnsplit, Extract filename from path
Hi all,

I know this has been covered a lot, I have been searching and reading for hours on the subject, however so far I have been unsuccessful at accomplishing the goal using sed.

I know this...
3,659
Posted By Festus Hagen
Honestly I am unsure about that, I assumed it was...
Honestly I am unsure about that, I assumed it was Bourne because of the use of sh!

I proudly use FBSD, currently 7.1R

I tried (not hard yet) to find the shell version info to post but was...
3,659
Posted By Festus Hagen
Thank you for your response! Thanks for the...
Thank you for your response!

Thanks for the "while true" tip!
Very understandable now that I think about it.

I want to remain in Bourne.

Anyone, Any other comments?
I am trying to learn,...
3,659
Posted By Festus Hagen
Paging/Scrolling a List of files for selection
Hi All,

I have the following script and would like to add page up and down functionality to be able to stroll through the list.

Is this possible?
If so, Any pointers to examples, info, tips,...
2,671
Posted By Festus Hagen
Awesome ... Beautiful ... Cool ... etc... Of...
Awesome ... Beautiful ... Cool ... etc...

Of course the first thing I did was reformat it like...

done << EOF
echo "${1}"
EOF
NOTICE the spaces to the left of...

echo "${1}"
...
Showing results 1 to 25 of 32

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