08-08-2008
INPUT:
Quote:
root directory-->animals
Subdirectory A--> humans
File ---> Joe
File ---> John
File ---> Mary
subsub directoryof A-->dogs
file ----> Blacky
subsub directoryof A-->cats
file ---->snowy
Subdirectory B-->fruits
File ---> apples
File ---> red
File ---> granny
subsub directoryof B-->banana
File---> banana1
Now the output is I require:-
Quote:
+-------------------+
|1 Joe apples |
|2 John red |
|3 Mary granny |
|4 Blacky banana1 |
|5 snowy |
+-------------------+
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
When I create filesystems in AIX i often get confused(using smit)
When you specify size in aix, it is asked like this
SIZE of file system (in 512-byte blocks)
I never seem to grasp this, what is the equation to get say
500mb? Or is there a program anyone knows of that does this, like a... (1 Reply)
Discussion started by: csaunders
1 Replies
2. UNIX for Dummies Questions & Answers
Hi ..
is there a way i can retrieve the output of gettimeoftheday in a string (1 Reply)
Discussion started by: p_aishwarya
1 Replies
3. Shell Programming and Scripting
Hi Guys,
I am trying to convert a file which has a row based output to a column based output. My original file looks like this:
1
2
3
4
5
6
1
2
3
1
2
3 (8 Replies)
Discussion started by: npatwardhan
8 Replies
4. Shell Programming and Scripting
I'm looking to build up a process which would compare 2 files and show difference, the difference needs to be done in such a way that it also shows which column value is differing.
So i think of this.
Run a diff between the files , then someway find which columns have different values need to... (6 Replies)
Discussion started by: dinjo_jo
6 Replies
5. Shell Programming and Scripting
I need some help converting the disk space values in kilobytes to gigabytes. I can't use df -h because the report has to be in megabytes for some disk space tracking software the customer is using.
I have been playing around with trying to assign variables I can use outside of awk so I can do... (1 Reply)
Discussion started by: kuliksco
1 Replies
6. Ubuntu
I have a need to convert 'Impress' presentations to DVD video format whilst retaining the original presentation in situ.
Copying the individual slides and modifying size etc. in Gimp and then importing them into 'Openshot' is both long winded and the loss of quality is significant.
Can anybody... (14 Replies)
Discussion started by: Royalist
14 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I would like to send below output in a tabular column ( xml or excel ) and send a mail.
vinay unix
anil sql
vamsee java
request to suggest a solution. (1 Reply)
Discussion started by: Girish19
1 Replies
8. Shell Programming and Scripting
I have Excel file with the below three columns, i need your expertise in converting this to .csv file delimiter "|"
Excel -
Serial Number Serial Name Serial Brand
111 test sample
123 test2 sample1
134 ... (9 Replies)
Discussion started by: kiran_hp
9 Replies
9. Shell Programming and Scripting
I am trying to perform linear interpolation on three columns in a CSV file.
When I run this code, I do not get any changes in the output (see Expected Output).
What am I doing wrong here?
Awk Code
'
function interpolate(lat1, lon1, t1, lat2, lon2, t2, i) {
for (i = 1; i... (2 Replies)
Discussion started by: hrrruser
2 Replies
10. Programming
Hi,
Below is the format of a report generated by a custom reporting solution. I opened the report in Notepad++ and junked data and values as in the image below.
https://www.unix.com/attachment.php?attachmentid=7907&stc=1&d=1575507708
I want to convert the values to a PIPE delimited format as... (2 Replies)
Discussion started by: ramkrix
2 Replies
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]
DESCRIPTION
Script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Options:
-a Append the output to file or typescript, retaining the prior contents.
-c COMMAND
Run the COMMAND rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves
differently when its stdout is not a tty.
-f Flush output after each write. This is nice for telecooperation: One person does `mkfifo foo; script -f foo' and another can super-
vise real-time what is being done using `cat foo'.
-q Be quiet.
-t Output timing data to standard error. This data contains two fields, separated by a space. The first field indicates how much time
elapsed since the previous output. The second field indicates how many characters were output this time. This information can be used
to replay typescripts with realistic typing and output delays.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. Script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is utilized by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism), scriptreplay(1).
HISTORY
The script command appeared in 3.0BSD.
BUGS
Script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
AVAILABILITY
The script command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
Linux July 30, 2000 Linux