@ Neo : Windows os only and im using Unix Shell/Bash scripting.
I have applied the below logic to eliminate comma if available in the string and then kept each string in array. Then I tried to search it in the file,but replacing the contents in the file is not working as expected.
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
... (1 Reply)
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
I have a list of strings in file:
10 10 AAA
120 13 BBBBB
23 11 CCCCC
11 32 DDDDDD
I want to replace first column of the text such as: 10, 129, 23, 11 with 11, 22, 33, 44.
I can do line by line, but just not sure how to replace partial string without... (1 Reply)
I have file t1.log
Contents of t1.log file
Number of records processed:
Number of records rejected:
Error :
xyz ..........
abc ..........
aaa _]
start time :
end time :
Please let me know how i can remove the contents highlighted in red in the t1.log file.
Thanks
Sam (3 Replies)
Hi Guys,
I need replace part of string in a file.
for example:
ABC=123
CDE=122
DEF=456
ABC=123
DED=333
ABC=123
I need replace the value after ABC=, highlighted in red. I want to get following result;
ABC=456
CDE=122
DEF=456
ABC=456
DED=333
ABC=456
Anybody can help me this.
... (8 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT REDHAT
autorun
AUTORUN(1)AUTORUN(1)NAME
autorun - automatically mounts/unmounts CDROMs and executes /path_to_cdrom/autorun after mounting
SYNOPSIS
autorun [-lmqv?V] [-a EXEC] [-c CDPLAYER] [-e STRING] [-i MILLISEC] [-n STRING]
[-t STRING] [--autorun=EXEC] [--cdplayer=CDPLAYER] [--interval=MILLISEC]
[--lock] [--mountonly] [--notify=STRING] [--notify-insert=STRING] [--notify-eject=STRING]
[--quiet] [--verbose] [--help] [--usage] [--version] [cdromdevices...]
DESCRIPTION
autorun automagically recognises all available CDROMs in your system, mounts them upon insertion and executes a possible 'autorun' exe-
cutable on the CD. To allow an ordinary user to do this you have to add the options user,exec in /etc/fstab to the CDROMs you want to use.
You may also use Autorun.desktop for KDE. Just place it in your Autostart folder.
Command strings are parsed and %P% is replaced by the mountpoint path. %D% is replaced by the device path. After that the command string
will be executed using /bin/sh -c "command string";
OPTIONS -a, --autorun=EXEC
Execute EXEC, if the CD changes. This executable must be located on the CD. I.e. if you specify "--autorun=myprogram", and your CD
is mounted under /mnt/cdrom, after the CD is changed, autorun will attempt to run "/mnt/cdrom/myprogram". (default "/autorun")
-c, --cdplayer=CDPLAYER
Run CDPLAYER, if an audio CD is inserted (default "/usr/bin/kscd")
-i, --interval=MILLISEC
The time to wait in MILLISEC between checks (default 1000)
-l, --lock
Lock the mounted media (unmount by hand)
-m, --mountonly
mount/unmount only (do not execute anything)
-n, --notify=STRING
Command STRING that will executed if the CD changes (default "/usr/bin/kfmclient configureDesktop")
-t, --notify-insert=STRING
Command STRING that will executed if a CD was inserted and the autorun executable "/autorun" or the one specified with --autorun was
NOT executed. (default "/usr/bin/kfmclient openURL %P%")
-e, --notify-eject=STRING
Command STRING that will executed if a CD was ejected (default "")
-q, --quiet
Don't produce any output
-v, --verbose
Produce verbose output
-?, --help
Give this help list
--usage
Give a short usage message
-V, --version
Print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
AUTHOR
Harald Hoyer <Harald.Hoyer@redhat.de>
There is a project web page at parzelle.de: http://parzelle.de/.
AUTORUN(1)