Sponsored Content
Top Forums Shell Programming and Scripting Need script to change a line in file.... Post 302784761 by hanson44 on Saturday 23rd of March 2013 02:48:03 AM
Old 03-23-2013
I agree. I was just trying to follow the skimpy example input / output.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change Specific Line of a File

Hi everyone, I am attempting to do something that should be very simple. How do I replace a specific line of a file with different text, and then save that file to its original name? I believe I want to use the sed command with the c option, but I after trying many times, I can't get the right... (10 Replies)
Discussion started by: msb65
10 Replies

2. Shell Programming and Scripting

Script to change file contents line by line

Hi, I'm struggling to write a script to do the following, -will go through each line in the file -in a specific character positions, changes the value to a new value -These character positions are fixed througout the file ----------------------- e.g.: file1.sh will have the following 3... (4 Replies)
Discussion started by: vini99
4 Replies

3. Shell Programming and Scripting

how to change one line in a file?

Suppose I have a file. The content of the file is: Fwf33 #enable_a STH. fwqfw egvega What I want to do is: if "STH" = "YES", do not change it, otherwise, change it to "YES". e.g. if “enable_a ERR” change it to be “enable_a YES” if “enable_a YES” do not change the file. ... (2 Replies)
Discussion started by: lilili07
2 Replies

4. Shell Programming and Scripting

Need to change two words in a line using shell script.

Hi, i have a line tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd /tftpboott in /etc/inet.conf file. ineed to replace nobody with root and /tftpboott with /flx/boot. i tried using sed ,but i could not change both of them. can you please help me to do this. Edit:... (7 Replies)
Discussion started by: vprasads
7 Replies

5. Shell Programming and Scripting

How to change values in certain column only in every line (any script)

Let say in a file I have lines of data like this : 13;2073;461496;15075341;3;001f7d3a;2042063674; 13;2074;461446;15080241;6;001ed33a;2042020154; 13;2075;461401;15085270;6;001f593b;2042054459; 13;2076;461381;15087160;6;001f7483;2042061443; 13;2077;461419;15083419;6;001eca1a;2042017818; I... (3 Replies)
Discussion started by: luna_soleil
3 Replies

6. Shell Programming and Scripting

Change a line in a php file thanks to a shell script

Hi, I'm working on a script to make automatic the new releases of my website... However in this script I put all the css script in a single one. There's no rpoblem for that. My problem is when I want to change the header of my layout page to put instead of : $header.="<link rel=\"stylesheet\"... (2 Replies)
Discussion started by: lahabana
2 Replies

7. Shell Programming and Scripting

Change in last line of each part of a file

Hi, I have a input files as below. Sample of one input file type mtg_key = record decimal("\344") id; string("\344") ct_cd; string("\344") st_cd; end; type psl_key = record decimal("\344") id; utf8 string("\344") st_cd; end; type amk_fields = record ... (6 Replies)
Discussion started by: adgangwar
6 Replies

8. Shell Programming and Scripting

Script to change first line of files in directory

I need a script to take the filename of every file in a directory and substitute that file name for whatever is on the first line of the file. There may or may not be anything on the line, but I want the line to be the same as the file name. Most of the script tools I have used are non-destructuve,... (14 Replies)
Discussion started by: LMHmedchem
14 Replies

9. UNIX for Beginners Questions & Answers

How to change name of the file with first line of the file which has some unwanted text in it?

I have a log file, which i have divided into 14 files using csplit, the file looks like below test-000000 test-000001 #and so on until 14 now I want all the 14 files generated to be renamed as the some part of test in first line of the file how can i eliminate the unwanted text? sample... (5 Replies)
Discussion started by: Sekhar419
5 Replies

10. Shell Programming and Scripting

How to change file section into each line?

Hi Gurus, I have below file which has different sections, need to move the sections to beginning of the each record. original file aaa bbb ccc ddd eee fff output file. aaa bbb ccc ddd eee fff (6 Replies)
Discussion started by: green_k
6 Replies
MKDUMPRD(8)							   User Manuals 						       MKDUMPRD(8)

NAME
mkdumprd - (Re)build the initramfs for kdump SYNOPSIS
mkdumprd [-h] [-q] [-f] [-k kernelver] [-i opts] DESCRIPTION
mkdumprd (re-)builds the kdump initrd. For kdump, a special initrd is used because o the kdump initrd should include network modules and network configuration (and therefore is larger as the normal initrd used for booting), o the kdump initrd should use no splash screen, o the kdump initrd includes kdumptool(8) and all required libraries. This script calls mkinitrd(8) with all required parameters. If the initrd already exists, it checks first if the configuration file or the kernel are newer, and only rebuilds the initrd if necessary. OPTIONS
All option parsing is done via the getopt(3) function, and therefore follows all standard command line parsing rules. -h | --help Shows help output and exits. -k kernelversion Specifies the kernel version. If no version is specified and also no kernel or initrd are specified, then mkdumprd uses kdumptool(8) to find out the correct kernel and initrd. -K kernel Specifies the kernel binary. If you specify that option, also specify -I. -I initrd Specifies the resulting initrd. If you specify that option, also specify -K. -q Be quiet. Don't output status messages. Used to call mkdumprd(8) from /etc/init.d/kdump init script. -i parameters Append the specified parameters to mkinitrd(8) call. FILES
/etc/sysconfig/kdump Kdump configuration. See kdump(5). BUGS
Please report bugs and enhancement requests at https://bugzilla.novell.com. COPYING
Copyright (c) 2008 Bernhard Walle <bwalle@suse.de>. Free use of this software is granted under the terms of the GNU General Public License (GPL), version 2 or later. SEE ALSO
kdumptool(8), mkinitrd(8), http://en.opensuse.org/Kdump kdump 0.8.1 07/05/2010 MKDUMPRD(8)
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy