10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I am facing a very unique problem and not able to understand why. I have written a function which will check header of the file. If header is present good else it will write the header on top
def writeHeaderOutputCSV(fileName):
# See if the file exist already
try:
... (0 Replies)
Discussion started by: radioactive9
0 Replies
2. Shell Programming and Scripting
Hi All ,
I have a pipe dilimited file .Sample file is below.I need to add header in that file through unix.
000001| 1|AQWWW|234,456.00 | | 123456| |41|abC| 0|xyZ|
000002| 2|11 4|1,234,456.99| | 0| |23| |99|! |
000003| 3|!!@#$|0,000,001.10| | ... (4 Replies)
Discussion started by: STCET22
4 Replies
3. Shell Programming and Scripting
Hi team,
In my script i am storing some value in a variable "header".
I want to add the header value has header in a file.
Please help me on this
Thanks in advance,
Baski (4 Replies)
Discussion started by: baskivs
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I want to add the below Header to all the files in sequence File1,File2,File3...etc
"ABC,<number of chracter in the file>"
e,g - If File1 is as below
pqrstuvdt
abcdefgh
then I want to add the above header into it ,So that File1 becomes as below
ABC,17
pqrstuvdt
abcdefgh
... (9 Replies)
Discussion started by: spari2
9 Replies
5. Shell Programming and Scripting
How can we a shell script and pass date parameters .I have 3 files comming from Datastage with |" delimited
I need append 3 files as above: File1:
P0000|"47416954|"AU|"000|"INS|"0000|"|"20060601|"99991231|"|"|"|"|"01
File 2:... (2 Replies)
Discussion started by: e1994264
2 Replies
6. Shell Programming and Scripting
I have a file with 50,000 records in it, i have a requirement to use the same 50,000 records and add them 4 times to the same file to make a total of 200,000 records. I was wondering how to do this using ksh. Any help is greatly appreciated. (2 Replies)
Discussion started by: vpv0002
2 Replies
7. Shell Programming and Scripting
Hi All ,
Kindly help me with this soln
awk '{printf "%s %7s \n", $1,$c}' infile
where
value of variable c I am externally giving input
But executing the above command shows all the columns of infile where as I want only 1st column of infile and 2nd column should print value c (8 Replies)
Discussion started by: Pratik4891
8 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I’m trying to add a row that will server as the header for a space separated file.
1-I have a number of files save in a directory
2- grep text path/*.log > newfile
newfile looks like this
Field1 Field2 Field3 Field4
Field1 Field2 Field3 Field4
Field1 Field2 Field3 Field4
Field1... (2 Replies)
Discussion started by: rene reivera jr
2 Replies
9. Shell Programming and Scripting
Hi Friends,
I want to know the command to add a new file in a existing tar file.
For Ex:
I have a tar file file1.tar with the contents
one.txt
two.txt
three.txt
Now I need to add file four.txt to this existing tar file, how can I do it?
Thanks in advance (4 Replies)
Discussion started by: mr_manii
4 Replies
10. Shell Programming and Scripting
not required this time (36 Replies)
Discussion started by: Sandeep_Malik
36 Replies