Sponsored Content
Top Forums UNIX for Dummies Questions & Answers add a string to a file without line break Post 302721929 by stunn3r on Friday 26th of October 2012 04:05:01 AM
Old 10-26-2012
Quote:
Originally Posted by pamu
Try

Code:
ssh ${_user}@${_ip} 'sudo /bin/sed  "s/kernel.*/& elevator=noop/" /etc/grub.conf'

Thanks, that worked Smilie .. just added "-i" .. Smilie

just one thing, it adds parameter "elevator=noop" to those lines too which are commented. Is it possible to add this parameter to only those lines which START with 'kernel', if a line start with "#" or something else, it should ignore that line ..

Last edited by stunn3r; 10-26-2012 at 05:13 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

Trim whitespace and add line break

All, I'm a newbie at shell scripting and regular expressions and I just need to take a file that's arranged like the one below, remove all leading and trailing whitespace and add a line break after each word. I've been able to remove a few spaces using various awk, sed and Perl scripts, but... (7 Replies)
Discussion started by: moose1
7 Replies

3. Shell Programming and Scripting

line break if string exceeds 100chars

I am required to develop a script to look for specific strings in the /var/adm/messages file on our Solaris10 host. When an entry is found in the file then I need that line to be piped to a log file. I have a script with the criteria i just need help with the manipulation of the text string. 1.... (6 Replies)
Discussion started by: s1ckle
6 Replies

4. Shell Programming and Scripting

Add line break for each line in a file

I cannot seem to get this to work.. I have a file which has about 100 lines, and there is no end of line (line break \n) at the end of each line, and this is causing problem when i paste them into an application. the file looks like this this is a test that is a test balblblablblhblbha... (1 Reply)
Discussion started by: fedora
1 Replies

5. Shell Programming and Scripting

break the string and print it in a new line after a specific word

Hi Gurus I am new to this forum.. I am using HP Unix OS. I have one single string in input file as shown below Abc123 | cde | fgh | ghik| lmno | Abc456 |one |two |three | four | Abc789 | five | Six | seven | eight | Abc098 | ........ I want to achive the result in a output file as shown... (3 Replies)
Discussion started by: kannansr621
3 Replies

6. Shell Programming and Scripting

Add Some String on each line of file

HI Guys, I am new user its my first post. I have one file in DIR XYZ. File name is ABCDEF.log Now i want to add that file in each line of file. I have data in file ABCDEF.log TestKLFH TEstLKHU HESTLJHG Now i want to update the file with below data ABCDEFG.log:TestKLFH... (5 Replies)
Discussion started by: asavaliya
5 Replies

7. Shell Programming and Scripting

Modify a file by another file: add new line and variable after string is found

hello, I have problem with writing/adjusting a shell script. I searched forum and unfortunately couldn't write scipt based on the information I found. I never wtire such so it's hard for me and I do need to modify one script immediately. case looks like: 1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies

8. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

9. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

10. Shell Programming and Scripting

Replace and add line in file with line in another file based on matching string

Hi, I want to achieve something similar to what described in another post: The difference is I want to add the line if the pattern is not found. File 1: A123, valueA, valueB B234, valueA, valueB C345, valueA, valueB D456, valueA, valueB E567, valueA, valueB F678, valueA, valueB ... (11 Replies)
Discussion started by: jyu3
11 Replies
ELVTUNE(8)						      System Manager's Manual							ELVTUNE(8)

NAME
elvtune - I/O elevator tuner SYNOPSIS
elvtune [-r r_lat] [-w w_lat] [-b b_max] device... elvtune -h elvtune -v DESCRIPTION
elvtune allows to tune the I/O elevator per blockdevice queue basis. The tuning can be safely done at runtime. Tuning the elevator means being able to change disk performance and interactiveness. In the output of elvtune the address of the queue tuned will be shown and it can be considered as a queue ID. For example multiple partitions in the same harddisk will share the same queue and so tuning one partition will be like tuning the whole HD. OPTIONS
-r r_lat set the max latency that the I/O scheduler will provide on each read. -w w_lat set the max latency that the I/O scheduler will provide on each write. -b b_max max coalescing factor allowed on writes when there are reads pending in the queue. -h help. -v version. NOTE
Actually the only fields tunable are those relative to the IO scheduler. It's not possible to select a one-way or two-way elevator yet. For logical blockdevices like LVM the tuning has to be done on the physical devices. Tuning the queue of the LVM logical device is useless. RETURN VALUE
0 on success and 1 on failure. HISTORY
Ioctls for tuning elevator behaviour were added in Linux 2.3.99-pre1. AUTHORS
Andrea Arcangeli <andrea@suse.de> SuSE AVAILABILITY
The elvtune command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Version 1.0 14 March 2000 ELVTUNE(8)
All times are GMT -4. The time now is 09:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy