10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
Discussion started by: cmccabe
10 Replies
2. Shell Programming and Scripting
Hi all,
I have 20 files (file001.txt upto file020.txt) and I want to read them from 3rd line upto end of file (line 1002). But in the final file they should appear to start from line 1.
I need following kind of output in a single file:
Filename Line number 2ndcolumn 4thcolumn
I... (14 Replies)
Discussion started by: bioinfo
14 Replies
3. UNIX for Dummies Questions & Answers
Hi ,
Can any one please tell me, how can we add the file name as column using sed.
right now we are using the below awk command for adding the file name as column but when we are calling this script from datastage it is deleting the file data..very weird raised a support ticket with datastage.... (2 Replies)
Discussion started by: mora
2 Replies
4. Shell Programming and Scripting
Hi,
I am a relative new bee in scripting. I need to develop a script such that the code would iterate through each file in a source directory and append every line of the file with '|' and the corresponding file filename.
eg
INPUT file IF927_1.dat -
H|abc... (4 Replies)
Discussion started by: scripting_newbe
4 Replies
5. Shell Programming and Scripting
Hi
i need help in adding leading zero to filenames
e.g file name in my folder are
1_234sd.txt
23_234sd.txt
the output i need is
001_234sd.txt
023_234sd.txt
can i do this shell scripting
please help (2 Replies)
Discussion started by: rsmpk
2 Replies
6. Shell Programming and Scripting
Hi All,
Its extremely urgent regarding the following requirement.
I have created few files in a directory. I have write a program in shell scripting such that it prompts for the filename . once the filename is entered,it should print the contents of the file.
Can anyone help with... (7 Replies)
Discussion started by: radhi2424
7 Replies
7. Shell Programming and Scripting
Hi,
I have 24 .dat files something like below. The file name starts with “abc” followed by two digit month and two digit year. Is there a way to grab the month and year from each filename and append it to the end of each line. Once this is done I want to combine all the files into file... (1 Reply)
Discussion started by: rkumar28
1 Replies
8. UNIX for Dummies Questions & Answers
for example i have a file which contains data like:
123
222
325
142
can anyone help me write a script that adds them?
let's say that "total" is the filename... (4 Replies)
Discussion started by: dakid
4 Replies
9. Shell Programming and Scripting
Dear Experts,
Please help to teach me how to add the filename into the file content.
Actually the file name are EVENTS-20050912.
***************New output that I want***************
EVENTS-20050912 03:33:37 ALARM: BTSSPAN-277-1 30-18013
EVENTS-20050912 12:10:28 ALARM: BTSSPAN-297-2... (1 Reply)
Discussion started by: missutoomuch
1 Replies
10. Shell Programming and Scripting
hi all,
i'm new to shell scripting, so i'm not sure how to work this. Is it possible to read in the contents of a variable and add it to a command? for example:
------------------------
#!/bin/sh
set example = -dfr
rm ${example}
------------------------
when i run the script, i want... (2 Replies)
Discussion started by: gammarays
2 Replies