ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
In my scenario the name of the iso keeps on changing like test1234-abcd.iso, test12346789-abcd.iso, test1234-abcdefg.iso, test123xyz.iso bla bla bla. But in all cases "test" will remain as it is and only the contents between "test" & ".iso" will change
So I want to write a generalized sed script to replace the previous iso name with the new iso name. For example to change
1) Actually, newer sed can edit-in-place. See the -i[SUFFIX] option.
2) * in regular expressions means 0 or more of the preceeding character. So you need to indicate what character you want to quantify. In your case, you want any character, and this is dot (.). So, you could use:
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Guys....Stop fighting.....All it maters is that it resolved my problem within seconds....Special thanks to "Disillusionist"...for making the command more easy & generalized ........All cheers to LQ...LQ rocks man...
Yeah, I was ribbing too... I know ghostdog for a long time, Mr.C. for a while, I felt I could do a little joke. ghostdog himself once told me to not be too serious... this is the good spirit at LQ. Enjoy it
I have known colucix and Mr.C (from another forum) for a long time too and we are not fighting, so no worries. by the way, i sure hope that your path do not coincidentally have "test" and "iso" together like in
ide1:0.fileName = "D:\isos\test12blahiso\test1234-abcd.iso".