|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
I need the line printed with echo to append to eof of to exactly line, am i able to do that?
i mean echo "sysctl -w lalala=1" > to end of file /etc/sysctl.conf or to the 21st line, if the line exist, open new line and insert text there. Thx.maybe i'm in wrong topic but anyway... |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
to echo to the end of a file use the >> instead of >
echo "sysctl -w lalala=1" >> /etc/sysctl.conf |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
FYI if you want the output of that command to be put at the end of the file use a forward tick `` in place of the double quotes "".
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to search and append words in the same file using unix scripting file operations | gsreeni | Shell Programming and Scripting | 5 | 12-06-2011 01:14 AM |
| Script to check for the file existence, if file exists it should echo the no of modified days | karthikeyan_mac | Shell Programming and Scripting | 2 | 08-03-2011 07:08 AM |
| Unix Script file to Append Characters before rows in file. | phani333 | Shell Programming and Scripting | 4 | 05-24-2010 02:28 AM |
| Append && echo "success" to all commands | dotancohen | Shell Programming and Scripting | 5 | 01-28-2010 07:23 PM |
| Append Status to echo'd line after process completes | Setan | Shell Programming and Scripting | 5 | 01-25-2008 04:59 PM |
|
|