Sponsored Content
Top Forums Shell Programming and Scripting Inserting variable values in filename Post 302790225 by CAch on Friday 5th of April 2013 02:47:50 AM
Old 04-05-2013
Hi Balajesuri,

It is actually printing the above result shown by you but filenames are as such....I basically want to change the filenames as it is printed above.
Please suggest me something to change the filename.

Last edited by CAch; 04-05-2013 at 04:03 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Inserting Values From A File Into A Table

Guys, I want to insert some values from a log file into a temporary table. the values in the log file looks like this SV_NAME CC_NAME CP_DISP_RUN_STATE ------- ------------------- ----------------- sble01 ALLTEL WorkMon24Hrs Running I want to enter the... (2 Replies)
Discussion started by: ragha81
2 Replies

2. Shell Programming and Scripting

help in inserting values in date format

how to assign values in this date format a=`date +"%H%M%S"` how to give value of H=22,here in this format so that i can grep 22nd hour.Below is the script -------------------------------------------------------------------------- a=`date +"%H%M%S"` for i in *.log do cat $i | grep $a... (3 Replies)
Discussion started by: ali560045
3 Replies

3. Shell Programming and Scripting

Inserting variable value into filename

Greetings, people of UNIX/Linux forums. I am having a problem with a script, where I am trying to create a new variable. The value of this variable would be dependent on the value in a couple other previous variables (all variables are 2-digit integers). Here is my code: #set the stations... (3 Replies)
Discussion started by: TheSMan5
3 Replies

4. Shell Programming and Scripting

inserting a variable to a new line

In my script I am using sed to insert a line. Suppose I have a variable called ck_size=5 and a temporary file called tmp I want to add a certain line in the tmp file .Please see the below command sed -i '2a\maitee is $ck_size' /dun/homes/lrsprod/tmp I want in 2 line of tmp file... (7 Replies)
Discussion started by: maitree
7 Replies

5. Shell Programming and Scripting

modify a file by inserting a conditional values

Hi, input file CCCC 1204 215764.85 9405410.40 1189 DDDD 4498 1503 4617 1507 4723 1517 4829 1528 4996 1540 DDDD 5199 1556 5278 1567 5529 1603 5674 1614 6076 1915 DDDD 6605 2371 7004 2779 CCCC ... (4 Replies)
Discussion started by: Indra2011
4 Replies

6. Shell Programming and Scripting

Inserting filename at the top of file

Hi Forum members, I want to insert the filename at the top of file (i.e, first row only) My file name is like asdf_432 And I want to insert this filename in first row as filename is asdf with serial no. 432 Thanks in advance. :) (4 Replies)
Discussion started by: CAch
4 Replies

7. Shell Programming and Scripting

Problem in inserting values of variable of shell

hi all, i have one shell script like this #!/bin/bash -xv ENV_NAME=`cat $IB_HOME_DIR/cfg/ibProfile.sh | grep "RDM_CONN" | cut -f 2 -d "@"` CURRENT_DIR=`pwd`; string=$IB_HOME_DIR string1="$string/FRGFOLDER/input" #sed "s/string3/$string1" frg_event_src.sql > modifiedinsert.sql sqlplus... (2 Replies)
Discussion started by: ramsavi
2 Replies

8. UNIX for Dummies Questions & Answers

Inserting a variable in awk script

I have file input.txt: >TX1-1 Freq 55 cattctgatgaatatttgtcctttagttgttatttgt >TX1-2 Freq 19 cattctgatgaatatttgtcctttagttgttatttgt >TX1-3 Freq 17 cattctgatgaatatttgtcctttagttgttatttgt >TX1-4 Freq 6 cattctgatgaatatttgtcctttagttgttatttgt >TX1-5 Freq 6 cattctgatgaatatttgtcctttagttgttatttgt ... (5 Replies)
Discussion started by: Xterra
5 Replies

9. Shell Programming and Scripting

Inserting values into database from an excel

Hi, I have a requirement where I have an excel sheet with the below values COL1 COL2 COL3 Germany URGENT NORMAL I want to cut the values of this excel in such a way that I get the values and pass it to an insert statement update tbfin set... (2 Replies)
Discussion started by: venkidhadha
2 Replies

10. Shell Programming and Scripting

Inserting values to database

hi , I'm new to Unix shell scripting. I need help to insert read csv which has two columns -emp no and logged date. csv file is a large file so i want to keep the insertion query in a separate .sql file. csv file looks this: empno | loggeddate ___________________ 5666 ,... (5 Replies)
Discussion started by: preema
5 Replies
ch_rc(1M)																 ch_rc(1M)

NAME
ch_rc - change system configuration file SYNOPSIS
root] {parameter|parameter=value}...] [file...] DESCRIPTION
manages the addition, modification, removal, and retrieval of information stored in files having the format of those in the directory. Parameter names are treated as strings. Thus, has no special meaning to in relation to other parameters named Options file Specify the file(s) to be used as the configuration database. If no file is specified, the set of files used by defaults to and all files in the directory. Modification and deletion of configuration parameters occurs in the file where the parameter is found. Add or modify a parameter definition. For each parameter specified on the command line, if the parameter is found in the specified (or default) files, it is modified to reflect the speci- fied value. If the parameter is not found, it is added to the specified file(s). If a new parameter is being defined, one or more files must be specified on the command line; the specified files are those in which the parameter will be defined. Remove a parameter definition. For each parameter name specified on the command line, remove any occurrence of that parameter from the specified file(s). List configuration values. For each parameter specified on the command line, output every definition of the parameter from the specified file(s). Output consists of only the values, one per line. Specify a parameter name or name/value pair. If a name and value is expected, but only a name is specified, the value will be set to the empty string. For example, specifying or will result in and respectively. Due to shell quoting rules, if you need a quoted parameter value, you must protect the quotes from the shell. For exam- ple, yields: which is an error, whereas, yields: Verbose. When used with the option, the option causes a verbose listing to be output. This listing includes a filename followed by the entire line containing the specified parameter for each occurrance of the parameter. The option is used to list all occurances of array parameters matching the parameters specified on the command line. For example, may emit the following output: Normally, the files specified on the command line are used as specified. By specifying a root directory with the option, all files (including the default files if none are specified) will be interpreted relative to root. For example, if root is specified as and is specified on the command line, it will be interpreted as RETURN VALUE
exits with one of the following values: 0 add/delete/list successful 1 command line syntax/usage error 2 can not access one or more of the listed (or default) files 3 can not open/create/write file 4 memory error 5 no files specified on command line for add option EXAMPLES
Files in the directory have the following format: WARNINGS
does not interpret configuration files; it only does pattern matching. As a result, if comments appear on lines containing parameter defi- nitions, the comments will also appear in output when using the option. cannot parse multiple parameter definitions which occur on the same line of a file. AUTHOR
was developed by HP. FILES
system configuration database driver file directory containing system configuration files SEE ALSO
rc.config(4). ch_rc(1M)
All times are GMT -4. The time now is 04:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy