10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name
data_file.txt
column_name file_name
col1 file1
col2 file2
col3 file1
col4 file1
col5 file2
now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
2. Shell Programming and Scripting
Hello,
Can someone please help in below requirement.
My requirement is to add date before to first column,some text before 1st,2nd coulmns and insert a new column in between 2 and 3 columns.
input file.
aa 123 dddd
aa 667 kdkdk
ddj 738 kkkk
aa 123 dddd
aa 667 ... (5 Replies)
Discussion started by: Cva2568
5 Replies
3. Shell Programming and Scripting
Hi,
I am doing something like below:
cat file1>file3and
cat file2>>file3
I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record.
cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies
4. Shell Programming and Scripting
Hi ,
I am trying to write an shell, which reads a text file (from a location) having a list of numbers of strictly 5 digits only ex: 33144
Now my script will check :
1) that each entry is only 5 digits & numeric only, no alphabets, & its not empty.
2)then it executes a shell script called... (8 Replies)
Discussion started by: new_to_shell
8 Replies
5. Shell Programming and Scripting
I have a tab delimited text file,
id name distance
1 3325167 0.334561754018
2 3290488 0.389444269458
3 3288794 0.392312701782
4 3347602 0.392532202097
5 3295355 0.394394169485
I need to add a line after the header line. The first and third field of... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
6. Shell Programming and Scripting
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Discussion started by: venu
3 Replies
7. Shell Programming and Scripting
Dear Friends,
I have a flat file where last line of it has word D$mhtt
I want to add a space and back slash after it.
Also wanna add -S "J" in the last line.
Following example will make it clear.
I have this in the last line of file
D$mhtt
I want
D$mhtt \
-S "J"
Please... (5 Replies)
Discussion started by: anushree.a
5 Replies
8. Shell Programming and Scripting
Hi,
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
Discussion started by: hertingm
4 Replies
9. Shell Programming and Scripting
I'm needing to add a "hour:min" to the end of each line in a document. The document in this case is only going to be one line.
if this inserts it at the end, what needs to be changed to add something at the end...
/bin/echo "%s/^/$filler/g\nwq!" | ex -s $oFile
Thank you... (2 Replies)
Discussion started by: cubs0729
2 Replies
10. Shell Programming and Scripting
How would I add text to the beginning of each line in a text file in a script right after the file is created from another text file. (4 Replies)
Discussion started by: cubs0729
4 Replies