08-06-2008
Kindly check the following script
#!/bin/bash
for i in `ls`
do
sed 's/stringname//' $i >$i,
mv $i, $i
done
If u want delete the string from different locations u have to use ls followed by path of the directory.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi everone!
My computer is ultra80,Operation system 2.6,when I boot get a message "WARNING: ap: no database locations "
And then I can login root , but for other user can`t login and had message "no shell". I use csh,after login root when I su -user also had... (11 Replies)
Discussion started by: yyt19701210
11 Replies
2. Shell Programming and Scripting
Is it possible to redirect standard output to two locations? Unfortunately, I need to redirect it to two different files. Or if there might be any utilities that can do it.
I'm suspecting not as it's all pipes and filters, but thought I'd ask. (2 Replies)
Discussion started by: GaryRudolph
2 Replies
3. Shell Programming and Scripting
Dear Sir,
I am Shidlingayya India, i am new to unix script..my problem is
present-> I have to read the eeprom locations from 0 to 255 locations in separate file..i wrote the code for this as follows
@eep_save_all ;<filename> store eeprom data to intel hex file
kr 0,,02/n
wf %1,... (0 Replies)
Discussion started by: shidlingayya
0 Replies
4. Solaris
Hi Guys,
There was a post that I saw here a while ago regarding file system layout and what to put where, which I am unable to find now..
A user here posted a man page that list what each partition should have in it and what it is used for and were you should install custom packages.
ie:... (1 Reply)
Discussion started by: Tornado
1 Replies
5. Programming
I've got the following two queries:
1) What's the difference in performance if a variable storage is at bss and not at the data section (apart from the initialization to zero in case of data section variables --like static variables).
In general, why a developer need to bother about the... (1 Reply)
Discussion started by: Praveen_218
1 Replies
6. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
7. UNIX for Dummies Questions & Answers
Hi ,
I have a file which looks like this
source1 LEN predictive 392879 394347 0.955489 + . Name=sa000003.1;ID=sa000003;Alias=sa121751.1;
source1 LEN descriptive_1 391082 392878 . . . Parent=sa000003.1;supp_id=.1805.1;
... (3 Replies)
Discussion started by: siya@
3 Replies
8. Shell Programming and Scripting
I have a backup script that runs on CRON that I developed about 5 years ago. It has always worked perfectly but a recent firmware update on my QNAP TS 259 has seem to break the large file move/copy capability amongst the ESATA drives.
I would like to just change my backhup.sh so that writes... (3 Replies)
Discussion started by: mackconsult
3 Replies
9. UNIX for Dummies Questions & Answers
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
10. Shell Programming and Scripting
Hi,
I need help in regard to developing a shell script to delete empty files from multiple specific locations. The directory paths will be stored in a text file. So the requirement is to read the text file for one specific path and then remove empty files from that particular path. Looping through... (4 Replies)
Discussion started by: Khan28
4 Replies