Sponsored Content
Top Forums Shell Programming and Scripting Inserting variable value into filename Post 302347073 by TheSMan5 on Monday 24th of August 2009 09:00:12 PM
Old 08-24-2009
Didn't work. Same error.

I have investigated further and now think that the mth, day and hr variables are actually arrays, as they were formed by cutting/counting characters from a multi-line dat file.

Any other ideas appreciated!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mv Filename variable to another filename

Anyone who can assist : I am trying to pass the group vairiable to a filename: rpt_tsavegrp=/export/legato/scripts/$group_savegrp_rpt.$dat It will not pass to variable. Anyone have any ideas what I am doing wrong here. Thanks # This script sends email that save group completed.... (3 Replies)
Discussion started by: gzs553
3 Replies

2. Shell Programming and Scripting

Inserting a line when its length is variable

Hi Unix experts I have simple text files in which the number of lines vary from one file to another. They look like the following: # # . . 34 46 76 72 39 68 I want to grab the first number of the last line of each file (let's say A= 39 in the above example), which is... (2 Replies)
Discussion started by: nxp
2 Replies

3. Shell Programming and Scripting

Inserting text to file, sed and variable not acting right

I want to put text stored in a variable into a file on the 7th line. I'm having trouble with this line: sed '7i\'$text'' $file It works perfectly for a single word, but fails if there are two words because of the space. I've tried several forms of quoting and this is the only one that... (2 Replies)
Discussion started by: fubaya
2 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. UNIX for Dummies Questions & Answers

awk for inserting a variable containing single and double quotes

Hi i have to insert the below line into a specific line number of another file export MBR_CNT_PRCP_TYPE_CODES_DEL="'01','02','04','05','49','55','UNK'" I have passed the above line to a variable say ins_line. I have used below command to perform the insert awk 'NR==3{print "'"${ins_line}"'"}1'... (1 Reply)
Discussion started by: sathishteradata
1 Replies

6. Shell Programming and Scripting

Inserting variable values in filename

Hi All, I have a directory containing multiple files. and also a txt file which contains the list of all filenames and certain values. I want to read the text file line by line and if its 2nd column is matched with the filename in directory, then it must insert the values in 7th column to... (14 Replies)
Discussion started by: CAch
14 Replies

7. 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

8. 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

9. Shell Programming and Scripting

Bash - Inserting non printable character(s) in string variable

Hello. I have a string variable named L_TEMP to test a very simple filter. L_TEMP="50AwL.|KWp9jk" I want to insert a non printable character between K and W. I have try this : linux-g65k:~ # a='50AwL.|K' linux-g65k:~ # b='Wp9jk' linux-g65k:~ # L_TEMP="$a$'\x07'$b" linux-g65k:~ # echo... (6 Replies)
Discussion started by: jcdole
6 Replies

10. 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
UCF.CONF(5)						      Debian GNU/Linux manual						       UCF.CONF(5)

NAME
ucf.conf - site-wide configuration file for ucf SYNOPSIS
/etc/ucf.conf DESCRIPTION
The file /etc/ucf.conf is actually a Bourne Shell snippet included during the package build process, and hence you may put any shell direc- tive in that file (just make very sure you know what you are doing). All the variables have reasonable default values, and some may be overridden on a per run or a per individual basis by using environment variables, and all configurable variables can be overridden by options to the scripts themselves. The value of a variable can be set so: a) Defaults exist in the rules file. These are the values used if no customization is done. b) Some variables can be set in the config file /etc/ucf.conf. These values override the defaults. c) Some variables can also be set by setting a corresponding environment variable. These values override the config file and the defaults. d) Using script command line options. All configurable variables may be set by this method, and will override the other methods above. Configuration File options At the moment, the user modifiable variables supported are: DEBUG Debugging information: The default value is 0 (no debugging information is printed). To enable debugging output, set the value to 1. VERBOSE Verbosity: The default value is 0 (quiet). To change the default behavior, set the value to 1. conf_force_conffold Force the installed file to be retained. The default is to have this variable unset, which makes the script ask in case of doubt. This can be overridden by the environment variable UCF_FORCE_CONFFOLD conf_force_conffnew Force the installed file to be overridden. The default is to have this variable unset, which makes the script ask in case of doubt. This can be overridden by the environment variable UCF_FORCE_CONFFNEW conf_source_dir This is the directory where the historical md5sums for a file are looked for. Specifically, the historical md5sums are looked for in either the file ${filename}.md5sum, or the subdirectory ${filename}.md5sum.d/ conf_old_mdsum_file Force the historical md5sums to be read from this file, rather than defaulting to living in the source directory. Set- ting this option overrides settings in the environment variable UCF_OLD_MDSUM_FILE Files System-wide defaults are placed in /etc/ucf.conf, SEE ALSO
ucf(1), BUGS
There are no bugs. Any resemblance thereof is delirium. Really. AUTHOR
This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system. Debian Feb 12 2002 UCF.CONF(5)
All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy