View previous topic :: View next topic |
Author |
Message |
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Thu Sep 05, 2002 3:14 pm Post subject: linking to part of a file |
|
|
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 |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Thu Sep 05, 2002 3:27 pm Post subject: |
|
|
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 |
|
|
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Thu Sep 05, 2002 3:40 pm Post subject: |
|
|
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 |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Thu Sep 05, 2002 3:56 pm Post subject: |
|
|
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 |
|
|
|