10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have to append the header (ie "START OF LINE") to a file only if there is data in it.
Below command is showing header though there is no data in a file, can you suggest how to correct..
awk '{NR!=0} BEGIN{print "START OF LINE"}; {print}' file (3 Replies)
Discussion started by: JSKOBS
3 Replies
2. Shell Programming and Scripting
Hi,
I am using Sun Solaris - SunOS. I have two fixed width files shown below. I am trying to find the changes in the records in the Newfile.txt for the records where the key column matches. The first column is a key column (example: A123).
If there are any new or deletion of records in the... (4 Replies)
Discussion started by: Saanvi1
4 Replies
3. HP-UX
HI,
Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
Discussion started by: lnemitz
2 Replies
4. Shell Programming and Scripting
I have one file with below entry. There are multiple entries, but for sample I used just three lines.
my requirment is to create a script by which it will pull only those entries which modification time is greater than 2 weeks (or 15 days). if I run script today, it will compare date from today... (4 Replies)
Discussion started by: anshu ranjan
4 Replies
5. Shell Programming and Scripting
I'm using a shell script to manipulate a data file. I have a large file with two sets of data samples (tracking memory consumption) taken over a long period of time, so I have many samples. The problem is that all the data is in the same file so that each sample contains two sets of data.... (2 Replies)
Discussion started by: abercrom
2 Replies
6. Shell Programming and Scripting
Hi All,
I have got a requirement.
I have a source file, EMPFULL.txt and I need to split the data for every 30 records
and place a Typical Header as below with system and page number too.
2012.01.03 Employee Dept Report 1... (6 Replies)
Discussion started by: srk409
6 Replies
7. UNIX for Dummies Questions & Answers
I tried this and it works for the most part, but if the date is 20090301, it displays 20090300.
YESTERDAY=$((`date +%Y%m%d` -1)) (2 Replies)
Discussion started by: cards0622
2 Replies
8. UNIX for Dummies Questions & Answers
One of the fortunate things about posting in a "Dummies" forum is you probably aren't expecting a lot of out me...
I'm trying to pull fields from two lines in the same file(s), and then append them together in a new file.
So...I get a nice line-by-line of the first bit of data I'm looking... (6 Replies)
Discussion started by: Milano_EH3
6 Replies
9. UNIX for Dummies Questions & Answers
Hi everyone,
I am new to Unix programming. My inquries is:-
a) How to add a Header and Trailer in the set of data
b) Include a number count of the data in the trailer
The set of data only contained the information of 'Customer's Name' and 'Account Number'. I would like to add the Header... (2 Replies)
Discussion started by: balzzz
2 Replies
10. Shell Programming and Scripting
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies