10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Folks -
How would I go about inserting a chunk of lines (3) into a specific portion of a file?
The background is I have a script (non shell) that it executed daily, however on Sundays, I uncomment a section of code so that piece can be run as well.
So I was hoping to write a piece of... (9 Replies)
Discussion started by: SIMMS7400
9 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
Discussion started by: bharath561989
19 Replies
3. Shell Programming and Scripting
Dear All,
I need to transfer all files present in one location to another but those files should be of specific extension like.
Find and copy all files of extension .xls, .pdf, .txt from location usr/tmp to location /per/Treat (6 Replies)
Discussion started by: yadavricky
6 Replies
4. Shell Programming and Scripting
I have a big file having 100 K lines.
I have to read each line and see at 356 character position whethere there is a word "W" in it. If it is their then don't delete the line otherwise delete it.
There are two lines as one Header and one trailer which should remain same.
Can somebody... (5 Replies)
Discussion started by: mohit kanoongo
5 Replies
5. Shell Programming and Scripting
Dear all,
i am having text file like below
surya
rama
ranga
laxman
rajesh
reddy
i want add string (OK) before a text from line 3 to 5
the result will be
surya
rama
OK ranga
OK laxman
OK rajesh
reddy (1 Reply)
Discussion started by: suryanarayana
1 Replies
6. Shell Programming and Scripting
In Perl. ***edited question below***
Hey all, I am teaching myself some simple CSV file manipulation and have become a little stuck. Say I have the following layout in the CSV file:
age,name,locationIs it possible to INSERT data into the CSV into the correct age order. For example, if I had... (1 Reply)
Discussion started by: whyte_rhyno
1 Replies
7. Shell Programming and Scripting
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies
8. Shell Programming and Scripting
So I work in a 1 to 1 laptop deployment and sometimes we need to mass order parts. The vendor will send us a text file and we have to manually input serial numbers. Well I have a full blown web based inventory system which I can pull serial number reports from.
I then have to input the part... (4 Replies)
Discussion started by: tlarkin
4 Replies
9. Shell Programming and Scripting
How can i remove the duplicate lines from a file, for example
sample123456Sample
testing123456testing
XXXXX131323XXXXX
YYYYY423432YYYYY
fsdfdsf123456gsdfdsd
all the duplicates from column 6-12 , must be deleted. I want to consider the first row, if same comes in the given range i want to... (1 Reply)
Discussion started by: gopikgunda
1 Replies
10. Shell Programming and Scripting
Hi There
I have this file that I would like to add entries to, however, there is a "}" as the last line that I need to keep. Basically i would like to know how I can write a script that will add new lines at the second to last line position (ie always add new line above the close bracket)
... (17 Replies)
Discussion started by: hcclnoodles
17 Replies