Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
linking to part of a file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Thu Sep 05, 2002 3:14 pm    Post subject: linking to part of a file Reply with quote

is it possible to ln -s (or equiv.) a few lines of a file to a few lines of another file?

e.g.

file 1:
Code:

blah blah blah.....
<2 source lines>
blah blah blah


file 2:
Code:

blah blah blah....
<links source lines to here>
blah blah blah....

_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Thu Sep 05, 2002 3:27 pm    Post subject: Reply with quote

There's no filesystem level way to do what you want (with ln for example), and I don't think there's any sort of general purpose way of doing anything quite like that... If it's something like a shell script, you could have those two lines in a third separate file, and "source" that file from the two original files. That could be similarly done with other scripting languages. You would have to edit that third file if you wanted to change or view those lines, but the scripts would execute almost as if they were in them.
_________________
"An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Thu Sep 05, 2002 3:40 pm    Post subject: Reply with quote

its a quake 3 config file, so i can share the player data but not the system settings between my windows and linux installations
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Thu Sep 05, 2002 3:56 pm    Post subject: Reply with quote

That's definately a non-trivial task! I'm not familiar at all with Quake 3 config files, but if it were me, I'd write a perl or [insert scripting language of choice] script to copy in the appropriate lines from the config file on the windows box to the linux one, and run it before running Quake. Better yet, have the perl script run Quake after it's updated the config file. I think I would shrivel up and die if I didn't have a powerful scripting language at my fingertips at all times for exactly this sort of problem.
_________________
"An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum