11-30-2018
Instead of asking us to keep up with your changing requirements, why don't you take the code RudiC suggested and try modifying it to meet your added requirements? We are here to help you learn how to write your own code; not to act as your unpaid programming staff for constantly changing requirements.
If you can't figure out what his code is doing after reading the awk man page on your system, ask us to explain what the code that you don't understand is doing. We want to help you learn how to write your own awk scripts.
Show us how you tried to modify it and tell us where you have problems if you can't get it to work.
If you do get it to work, show us what you came up with. Maybe we'll be able to show you shortcuts that will make your code work faster or more reliably. Again... we want to help you learn how to write your own code. (And, please use CODE tags when displaying sample input, sample output, and code segments.)
These 2 Users Gave Thanks to Don Cragun For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file which contains the data in the below format and need to develop a script which will give the output in the tabular format.
Could you please advice me.
Folder:
Workflow: version .
Workflow run status:
Workflow run error code:
Schedule time:
Workflow run type: ... (2 Replies)
Discussion started by: kandi.reddy
2 Replies
2. Shell Programming and Scripting
Hi
I want to display the following input data into the tabular format as shown in the output.
Input.txt:
Following jobs are in pending state for more than 10 minutes:
JOB_ID JOB_SUBMIT_ID
MAHAR 784308
PUNJA 109367
Following jobs are running for longer time:
JOB_ID... (1 Reply)
Discussion started by: dats
1 Replies
3. UNIX for Advanced & Expert Users
Hi I am working on a script in which I am firing a query on database through Unix and getting the result set. I want to export that in an excel file. I am able to do so nut the result are exported horizontally one below the other. Can anyone plss help me out in exporting the Result in Tabular... (4 Replies)
Discussion started by: Saritau3
4 Replies
4. Shell Programming and Scripting
Hi,
I have directory with multiple files from which i need to extract portion of specif lines and insert it in a new file, the new file will contain a separate columns for each file data.
Example:
I need to extract Value_1 & Value_3 from all files and insert in output file as below:
... (2 Replies)
Discussion started by: belalr
2 Replies
5. Shell Programming and Scripting
How can i convert the below data to a simpler format :-
cat tabular.txt
User 1 Details :-
First Name = Tom
Middle Name =
Last Name = Hanks
Age = 40
Address =
User 2 details :-
First Name = Mike
Middle Name =
Last Name = Tyson
Age = 50
Address = (2 Replies)
Discussion started by: lazydev
2 Replies
6. Shell Programming and Scripting
I have a grep command script which works fine and give the correct results but i wanted the output to be displayed in tabular format ? Is it possible to display
the output in tabular format and as well direct them to some file.
main script :
#!/usr/bin/bash
Start_Time=`date '+%m%d%y... (1 Reply)
Discussion started by: Optimus81
1 Replies
7. Shell Programming and Scripting
Hi ,
I am purging two tables based on date.
In my script I am taking the count of the tables purging them and then taking the after counts. I need to mail the before and after counts of the two tables in a mail in table format as mentioned in the result section.
For Eg:
## Count of the... (14 Replies)
Discussion started by: CFA
14 Replies
8. Shell Programming and Scripting
Please provide script/commands to convert text file to HTML tabular format.
No need of styles and colours, just output and a heading in table is required.
Output file will be send via email and will be seen from outlook.
(script required without using awk).
output file content: (sar... (7 Replies)
Discussion started by: Veera_V
7 Replies
9. Shell Programming and Scripting
Hi ,
i am generating some data by firing sql query with connecting to the database by my solaris box.
The below one should be the header line of my excel ,here its coming in separate row.
TO_CHAR(C. CURR_EMP_NO
---------- ---------------
LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies
10. Shell Programming and Scripting
Hi Guys,
I am stuck in between and seeking help here.
Requirement: A script that will run every morning which will connect to Mysql database and run the query to inform us about the holidays (it will also check if there were any holidays during last 2 business days). So the three queries are... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
SHAR(1) BSD General Commands Manual SHAR(1)
NAME
shar -- create a shell archive of files
SYNOPSIS
shar file ...
DESCRIPTION
The shar command writes a sh(1) shell script to the standard output which will recreate the file hierarchy specified by the command line op-
erands. Directories will be recreated and must be specified before the files they contain (the find(1) utility does this correctly).
The shar command is normally used for distributing files by ftp(1) or mail(1).
EXAMPLES
To create a shell archive of the program ls(1) and mail it to Rick:
cd ls
shar `find . -print` | mail -s "ls source" rick
To recreate the program directory:
mkdir ls
cd ls
...
<delete header lines and examine mailed archive>
...
sh archive
SEE ALSO
compress(1), mail(1), tar(1), uuencode(1)
HISTORY
The shar command appeared in 4.4BSD.
BUGS
The shar command makes no provisions for special types of files or files containing magic characters. The shar command cannot handle files
without a newline ('
') as the last character.
It is easy to insert trojan horses into shar files. It is strongly recommended that all shell archive files be examined before running them
through sh(1). Archives produced using this implementation of shar may be easily examined with the command:
egrep -v '^[X#]' shar.file
BSD
June 6, 1993 BSD