Is there a way that I can make the following work with using variables?
perl -pi -e 's#blah#hrm#ig' replacetext
but like this
var=blah
perl -pi -e 's#$var#hrm#ig' replacetext (3 Replies)
Please Help... I am trying to manipulte the following line
Before :
<user:Account_Password>002786</user:Account_Password>
the password is the "variable", i need to delete / omit the password in the file, (it occurs several thousand times)
so the tag line looks like
After:... (4 Replies)
I'm trying to replace text in a file with text from a variable
I have the following in my script, but its not working:
#!/bin/ksh
echo "Enter the path to load scripts"
read x
echo "updating the templates"
sed "s/CHANGE_ME_TO_LOAD_PATH/"$x"/g" LoadFiles.sh > LoadFiles2.sh
I thought... (1 Reply)
I have a text file with following content (3 lines)
filename : output.txt
first line:12/12/2008
second line:12/12/2008
third line:Y
I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before.
I tried using cat output.txt... (4 Replies)
I am trying to write a shell script that will allow the typing of a value, then using that value to replace data in a text file.
I suspect I need sed.
The format of the file is:
Variable1:Value1
Variable2:Value2
The interaction would be something like:
Shell Prompt: "Please enter the... (9 Replies)
Hi
I have a text file (mytext.txt), the content of which is as following:
My name is <@MY_NAME@> and my age is <@MY_AGE@> .
Now i have another property file (myprops) which is as following:
MY_NAME=abcdefgh
MY_AGE=000000
I was wondering, how can i replace the tags of mytext.txt, with its... (1 Reply)
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
so...
Lets assume I have a text file.
The text file contains multiple "#" symbols.
I want to replace all thos "#"s with a STRING using DOS/Batch
I want to add a certain TEXT to the end of each line.
How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Hi All, Hoping someone can help....
I am trying to work out how I can ammend a log file to remove variable strings in order to remove confidential information which I cant pass on.
As an example I have used phone numbers. A large log file contains multiple lines containing something like the... (6 Replies)
Hello All,
we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies
LEARN ABOUT REDHAT
ftl_format
FTL_FORMAT(1) General Commands Manual FTL_FORMAT(1)NAME
ftl_format - Flash Translation Layer formatting utility
SYNOPSIS
ftl_format [-q] [-i] [-s spare] [-r reserve] [-b bootsize] device
DESCRIPTION
Ftl_format creates a Flash Translation Layer partition on a flash memory device. It needs to access the flash partition's raw character-
mode device (such as /dev/mem0c0c).
This is actually a low-level format operation, required before accessing a memory device via the FTL block device driver. Once a partition
is prepared with ftl_format, a filesystem should be created in a separate step. Filesystem commands should access the device via the FTL
device file (such as /dev/ftl0).
Optionally, ftl_format can reserve a region at the beginning of the flash card address space for a boot image (or any other purpose). The
boot area is not part of the FTL partition, and can only be accessed via the raw memory device.
On Intel Series 100 flash cards, the first flash block is used to store the card's configuration information structures. If no boot area
is specified on the command line, ftl_format will automatically create one to span the first block.
OPTIONS -q Quiet mode: don't print formatting statistics.
-i Interactive: confirm before beginning the format.
-s spare
Reserve the specified number of erase blocks as spares. The default is 1. A read-write partition requires at least one spare
block.
-r reserve
Reserve the specified percentage of the total space on the device to improve write efficiency. The default is 5%. Reserving less
space increases the frequency of flash erase operations to reclaim free blocks.
-b bootsize
Requests that a portion of the flash card be reserved for a boot image. The size will be rounded up to an integral number of erase
blocks.
AUTHOR
David Hinds - dahinds@users.sourceforge.net
SEE ALSO ftl_cs(4), ftl_check(8).
pcmcia-cs 2000/06/12 21:24:48 FTL_FORMAT(1)