PDA

View Full Version : Script



estica
05-Sep-2015, 00:06
For example if I want to exchange information of a XXXX file.

The XXXX fcheiro contains: NAME: FILE

I want him to switch to: NAME: YYYY

How would the script in suse studio for the process


--
estica
------------------------------------------------------------------------
estica's Profile: http://forums.opensuse.org/member.php?userid=95225
View this thread: http://forums.opensuse.org/showthread.php?t=509565

ab
07-Sep-2015, 01:15
In the script section you could put the following line that would probably
do the job, if I understand your request fully:



sed -i -e 's/NAME: FILE/NAME: YYYY/'



--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...

estica
07-Sep-2015, 01:36
ab;2727214 Wrote:
> In the script section you could put the following line that would
> probably
> do the job, if I understand your request fully:
>
> >
Code:
--------------------
> >
> sed -i -e 's/NAME: FILE/NAME: YYYY/'
>
--------------------
> >
>
>
> --
> Good luck.
>
> If you find this post helpful and are logged into the web interface,
> show your appreciation and click on the star below...

I'll simplify.

I have a file in "/ usr /" ... The file name is "DOC"

Within the file is written "LINUX" ...


I want a script that whenever I shut down the OS will change what is
written in the file to "LINUX NEW"


--
estica
------------------------------------------------------------------------
estica's Profile: http://forums.opensuse.org/member.php?userid=95225
View this thread: http://forums.opensuse.org/showthread.php?t=509565

estica
13-Sep-2015, 16:26
Help please


--
estica
------------------------------------------------------------------------
estica's Profile: http://forums.opensuse.org/member.php?userid=95225
View this thread: http://forums.opensuse.org/showthread.php?t=509565

DocB
18-Sep-2015, 12:46
estica;2727979 Wrote:
> Help please

man sed
or read in the other Studio Forum


--
DocB
------------------------------------------------------------------------
DocB's Profile: http://forums.opensuse.org/member.php?userid=574
View this thread: http://forums.opensuse.org/showthread.php?t=509565