Sponsored Content
Top Forums Shell Programming and Scripting Need scripting help in :Adding 20% to a list of number : Post 302368916 by rveri on Friday 6th of November 2009 01:27:10 AM
Old 11-06-2009
Thanks , Resolved.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell scripting adding text to top of file

Hi this is quite simple i am sure but without using awk or sed i need to add text to the top of a file this is what i have got so far #!bin/bash echo "Add text to top of file" read line echo $line >> file1 This adds the text to the bottom of the file can some1 please help cheers (7 Replies)
Discussion started by: meadhere
7 Replies

2. Shell Programming and Scripting

Adding a columnfrom a specifit line number to a specific line number

Hi, I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers. To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies

3. Shell Programming and Scripting

merging line and adding number

I having file below o/p ibapp311dg,,20480,s,,,,,,,,, test,,20480,s,,,,,,,,, test,,20480,s,,,,,,,,, ibapp311dg,,20480,s,,,,,,,,, I want to to chk unique word line in the first field seperated by , as well as addup corressponding the number in field for each unique word like ibapp311dg... (8 Replies)
Discussion started by: tarunn.dubeyy
8 Replies

4. Shell Programming and Scripting

Adding Two Number With Expression Function

ai, i have one question about shell script regarding for "expr" function i have using this command "previous=`expr $previous + 1`" where previous value is 0001, but when the script running, the result appear as expr 1 + 1 = 2 not 0002. The result i need as expr 0001 + 0001 should be... (2 Replies)
Discussion started by: dinodegil
2 Replies

5. UNIX for Dummies Questions & Answers

Adding Sequence Number to file

Hi All, I need to create a script which checks for a particular file for eg.kumar1.txt. If kumar1.txt is already exist the script should increment the file name as kumar2.txt and so on. Please Advise. Thanks & Regards, Kumar66 (2 Replies)
Discussion started by: kumar66
2 Replies

6. Shell Programming and Scripting

Adding number before file extension

Hi , I have a file which has a line starts with $segment_name and has the below data source data $Segment_Name = 123.ABC.123.01.txt $Segment_Name = 123.ABC.ABC.txt $Segment_Name = 123.ABC.12A3.txtMy target data should be $Segment_Name = 123.ABC.123.01.txt $Segment_Name =... (2 Replies)
Discussion started by: shruthidwh
2 Replies

7. Shell Programming and Scripting

Need Help in adding sequence number to a file

Hi All , I have a file which contains data(comma separated) in below format : 500,Sourav ,kolkata ,8745775020,700091 505,ram,delhi ,9875645874,600032 510 ,madhu ,mumbai ,5698756430 ,500042 515 ,ramesh ,blore ,8769045601 ,400092 I want to add unique sequence number at the start of each... (7 Replies)
Discussion started by: STCET22
7 Replies

8. Shell Programming and Scripting

Adding number in one column

Hello I have something like this a 1 b 1 c 1 d 1 e 1 This is inside 1.dat and this is what I am trying to get a 2 b 2 c 2 d 2 e 2 (4 Replies)
Discussion started by: jeo_fb
4 Replies

9. Shell Programming and Scripting

List files with number to select based on number

Hi experts, I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number. I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
Discussion started by: mysocks
5 Replies

10. Shell Programming and Scripting

Bash Scripting: Adding runtime in a progress bar

I have the following code that generates a progress bar and want to add the current execution time after the percentage value. The current execution time is stored in the variable `runtm` I am having a problem on how to add `runtm` in the last `printf` or after it. i=0; j=0 ... (3 Replies)
Discussion started by: kristinu
3 Replies
MKINITRD(5)							   User Manuals 						       MKINITRD(5)

NAME
mkinitrd - description of modular scripts layout SYNOPSIS
(not applicable) DESCRIPTION
mkinitrd creates initial ramdisk images for booting Linux. It is designed to be modular, so that functionality required by other programs can be maintained in separate scripts. DIRECTORY LAYOUT
All files are located in the directory /lib/mkinitrd. The directory has the following layout: bin External program required during boot dev Additional devices nodes to be copied into the mkinitrd. scripts Repository for mkinitrd scripts setup Resolved links for scripts to be executed during creation of the initrd boot Resolved links for scripts to be executed during boot. SCRIPT REPOSITORY
The directory /lib/mkinitrd/scripts is the repository for all mkinitrd scripts. They follow the naming convention <type>-<name>.sh <type> can be either setup for scripts to be called during initrd creation or boot for scripts to be called during boot. The <name> for a script serves as an identification for the implemented feature; it is assumed that scripts named boot-foo.sh and setup-foo.sh both refer to the feature foo. SCRIPT SYMLINK RESOLUTION
The directories /lib/mkinitrd/setup and /lib/mkinitrd/boot hold the resolved symlinks to the scripts in the mkinitrd repository. The symlinks have the naming convention <number>-<name>.sh where <number> determines the execution order (lower numbers will be executed earlier) and <name> is the names of the script as mentioned in the previous section. The symlinks are maintained by the program /sbin/mkinitrd_setup which evaluates the tags in the scripts and creates symlinks with the correct name. Manual maintenance in the /lib/mkinitrd/setup or /lib/mkinitrd/boot directories are strongly discouraged, as any call to /sbin/mkinitrd_setup will remove the manually created links. SCRIPT KEYWORDS
The execution order of the mkinitrd scripts is determined by keywords. The following keywords are recognized: #%stage: <name> The execution stage for this script #%depends: <list> Space-separated list of features or scripts names this script depends upon. #%provides: <list> Space-separated list of additional features provided by this script. #%dontshow Don't show the script in the list of features displayed to the user. #%programs: <list> A (space separated) list of programs, specified by their full path, that should be included in the initrd. NOTE: The path is the full path in the initrd, not in the system. mkinitrd tries to discover programs automatically, which means that programs in /sbin will be also searched in /usr/sbin and programs in /bin will be also searched in /usr/bin. Libraries are automatically resolved by ldd(1). Please note that libraries that are loaded at runtime by dlopen(3) are not included automatically. They have to be copied manually. #%modules: <list> List of (space separated) kernel modules (only the name, no path, without suffix) that should be included in the initrd. The modules must be loaded in the corresponding boot script with load_modules. #%udevmodules: <list> List of (space separated) kernel modules (only the name, no path, without suffix) that should be included in the initrd but are loaded automatically with either udev or something else (like file system modules with mount). Each script provides per default a feature with the script name, so that setup-foo.sh automatically provides a feature foo. All dependend scripts (i.e. any feature listed in the #%depends: list) will be executed prior to this script. EXECUTION STAGES
Script execution is gouverned by stages. The stages define the overall execution order as each stage is executed sequentially. The defined stages are: setup General preparation filesystem Filesystem detection and maintenance crypto Handling of cryptographic volumes volumemanager Handling of LVM2 and EVMS volumes softraid Detection and setup of MD devices partitions Detection and setup of partitions. devicemapper Device-mapper devices presenting full disks, e.g. multipath and dmraid block Detection and setup of block devices. device Detection and setup of hardware devices boot Final cleanups/preparation During setup the stages are executed from setup to boot; during boot the stages are executed in reversed order. The stages itself are defined corresponding to the Novell Storage Foundation Layout. This induces some restrictions to the possible device setups, as e.g. MD over LVM is not supported. The stages are executed sequentially. All scripts for a stage have to be executed before those for the next stage are evaluated. Within a stage scripts can run parallel where pos- sible. As each stage serves as a checkpoint it is not possible to have dependencies across stages. So script foo in stage filesystem cannot depend on script bar in stage block. SCRIPT INSTALLATION
New scripts should be copied to /lib/mkinitrd/scripts and the appropriate keywords should be inserted. Afterwards /sbin/mkinitrd_setup should be executed to update the symlinks in boot and setup. For removal the scripts should be deleted and /sbin/mkinitrd_setup should be called to update the symlinks. AUTHORS
Steffen Winterfeldt <snwint@suse.de>, Susanne Oberhauser <froh@suse.de>, Andreas Grunbacher <agruen@suse.de>, Hannes Reinecke <hare@suse.de>, Alexander Graf <agraf@suse.de>, Bernhard Walle <bwalle@suse.de> FILES
/lib/mkinitrd /sbin/mkinitrd /sbin/mkinitrd_setup BUGS
Please report bugs and enhancement requests at https://bugzilla.novell.com. SEE ALSO
mkinitrd(8), lsinitrd(8) mkinitrd 07/05/2010 MKINITRD(5)
All times are GMT -4. The time now is 12:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy