I am trying to process error files in selected directories. I can count the files that are there and export the contents to a file for either emailing or printing. The next step is to move the files to a processed directory with the name changed to .fixed as the last extension.
for file in... (2 Replies)
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)
Hi,
I have searched the forum on how to mass replace the file names. We are doing the migration and I am trying to accomplish a task where I have to replace all UNIX scripts in a particular directory that start with bdw to fdm...
For example: bdw0110137.sh should be fdm0110137.sh
Keep the... (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)
Hey all,
So I know you can easily find and replace words and strings in text files, but is there an easy way to find and replace just a sub-portion of text in the file name. For example, in a directory I have tons of file names that start with F00001-0708, and I want to change all the files to... (2 Replies)
Hi All ,
I am having confusion in a shell script. Please guide me.
I need to get multiple files (number of files vary time to time, file names are separated by '|') using FTP get from the remote server.
Actually, i call the FTP function in a loop. At the last step, i need to move all the get... (3 Replies)
Hi,
I'm making a script that automaticaly set file size and path in xml file.
I tried with :
sed -i 's/BOOTPATH/TEST/g' file.xml
it works fine
but if I use a viriable :
sed -i 's/BOOTPATH/$bootpathf/g' file.xml
with this one, no change are made.
I don't understand why. If a make a ... (13 Replies)
Hi, I have a file like this:
>Contig1
TTTTCATCAGCAATAGGTGCCTTCAACAAGTTTGAGAATTTTTTACACATGACTACAGGG
CACGTGCACAATGTTTTGAGCACTGCCAATGTCGTCTTTTCTTCCCTGCTGATTCTATTT
AGCTAGATTCACTTTGTTTCCAAAAAACGACAACAAATTCCAAGGTGTACCAAGGTGTAT
>Contig2
CCCGTAGTAAAGATCAAAACTATCCCCTGCTGTATTCTCAACCAAATCCAACAAACTCTC... (3 Replies)
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)
As part of a bash the below line strips off a numerical prefix from directory 1 to search for in directory 2.
for file in /home/cmccabe/Desktop/comparison/missing/*.txt
do
file1=${file##*/} # Strip off directory
getprefix=${file1%%_*.txt}
... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT DEBIAN
mtext_get_prop
mtext_get_prop(3m17n) The m17n Library mtext_get_prop(3m17n)NAME
mtext_get_prop - Get the value of the topmost text property.
SYNOPSIS
void* mtext_get_prop (MText * mt, int pos, MSymbol key)
DESCRIPTION
Get the value of the topmost text property. The mtext_get_prop() function searches the character at pos in M-text mt for the text property
whose key is key.
RETURN VALUE
If a text property is found, mtext_get_prop() returns the value of the property. If the property has multiple values, it returns the
topmost one. If no such property is found, it returns NULL without changing the external variable merror_code.
If an error is detected, mtext_get_prop() returns NULL and assigns an error code to the external variable merror_code.
Note:
If NULL is returned without an error, there are two possibilities:
o the character at pos does not have a property whose key is key, or
o the character does have such a property and its value is NULL.
If you need to distinguish these two cases, use the mtext_get_prop_values() function instead.
ERRORS
MERROR_RANGE, MERROR_SYMBOL
SEE ALSO
mtext_get_prop_values(), mtext_put_prop(), mtext_put_prop_values(), mtext_push_prop(), mtext_pop_prop(), mtext_prop_range()
COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License
<http://www.gnu.org/licenses/fdl.html>.
Version 1.6.2 12 Jan 2011 mtext_get_prop(3m17n)