•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,428 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,575 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1305 | Replies: 1
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I wrote a script as below
#!/bin/bash
echo $1 > temp
cat $2 >> temp
mv temp $2 # this command helps us to retain the original name of the file #
now how to append the script so tht it now inserts the first argument into the middle of the file and also the original file must retain its original name. http://www.unix.com/images/buttons/edit.gif
#!/bin/bash
echo $1 > temp
cat $2 >> temp
mv temp $2 # this command helps us to retain the original name of the file #
now how to append the script so tht it now inserts the first argument into the middle of the file and also the original file must retain its original name. http://www.unix.com/images/buttons/edit.gif
•
•
Join Date: Feb 2007
Location: Bangalore, India
Posts: 535
Reputation:
Rep Power: 4
Solved Threads: 50
>> now how to append the script so tht it now inserts the first argument into the middle of the file and also the original file must retain its original name.
Not clear what you wanna do??
append the script => append which script? append TO what?
middle of the file => Which file?
original file => Which is the original file?
Not clear what you wanna do??
append the script => append which script? append TO what?
middle of the file => Which file?
original file => Which is the original file?
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- project plz who can help me (C++)
- File Attachment Small Problem (PHP)
- Replacing text within a file using awk (Shell Scripting)
- who can help me in c++ project (C++)
- Reading a file into a binary search tree (C++)
- Class File, making directories... relative to (Java)
- binary file manipulations (C)
Other Threads in the Shell Scripting Forum
- Previous Thread: Replacing text within a file using awk
- Next Thread: Shell script Help


Linear Mode