Sponsored Content
Top Forums Shell Programming and Scripting Making 99 folders 99 folders deep Post 302517490 by alister on Wednesday 27th of April 2011 02:01:31 AM
Old 04-27-2011
That's just a very minor tweak. Add another argument to the script (so that it doesn't use the same one for both levels and # of dirs per level) and then modify the jot command to use the new argument.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Backing up Folders without some folders...;)

I am in a fix....... I have to write a backup script to backup say Folder A. Folder A contains n folders 1,2 ,3 .....n. my script should copy A without folder 2 & 3. Is there anyway I can do it without writing individual copy commands???? Please help.... (1 Reply)
Discussion started by: chimpu
1 Replies

2. UNIX for Dummies Questions & Answers

Copying Folders without some folders... ;-)

I am in a fix....... I have to write a backup script to backup say Folder A. Folder A contains n folders 1,2 ,3 .....n. my script should copy A without folder 2 & 3. Is there anyway I can do it without writing individual copy commands???? Please help.... (5 Replies)
Discussion started by: chimpu
5 Replies

3. Shell Programming and Scripting

Renaming folders

Hello, I'm new to unix and I have to rename all folder fron the current folder from a name like "xx - Name of the Folder" to "Name of the Folder - xx". xx is a number ... Can somebody, please, help? Thank you! (6 Replies)
Discussion started by: mirciulicai
6 Replies

4. Shell Programming and Scripting

How to hide folders

hello everybody, i would like to hide visibility of the folders , i.e. not to giving any physically visibility to any users . Is there any way to do it other than changing the permission and adding "." post folder name . by changing the permission , we cann't do any activity , but have... (1 Reply)
Discussion started by: manas_ranjan
1 Replies

5. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

6. Solaris

Folders with more than one 'owner'

I have a peculiar problem. I have a particular directory with the following characteristics: -bash-3.00# ls -lah total 18 drwxr-x--- 7 gandalf shire 512 jul 3 07:20 . drwxr-x--- 11 gandalf shire 512 mai 10 2010 .. drwxr-xr-x 6 gandalf shire 3,0K jul 24 19:25 brasdeff drwxr-xr-x... (9 Replies)
Discussion started by: poyato
9 Replies

7. Shell Programming and Scripting

Copy between two different folders containing same sub-folders

I have a folder like this ls input1 dir1 dir2 dir3 file1 file2 file3 dir1, dir2 and dir3 are sub-folders inside the folder input1 ls input2 dir1 dir2 dir3 file1 file2 file3 My dir1 in input1 folder has files f1, f2, f3 and f4. My dir1 in input2 folder has file f4 and f5. ... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

8. UNIX for Dummies Questions & Answers

Archive folders and sub folders

Hi Can i archive folder and folders in with the tar command My files are located in subfolders Eg: Folder1/Folder1_1/*.pdf Folder1/Folder1_2/*.pdf Folder1/Folder1_3/*.pdf so i would like to tar all the files in Folder1_1 and Folder1_2 only not Folder1_3 that should be done next... (2 Replies)
Discussion started by: cnrj
2 Replies

9. Shell Programming and Scripting

Exclude certain folders

Hi Experts, Below is my shell script and it will move the files older than 90 days to archive mount. Now my new requirement is , I need to move some of the directory files older than 365 days. How can I achieve this. Simply I have DIR1 DIR2 DIR3 DIR4 I need to exclude DIR 2 and DIR 2... (5 Replies)
Discussion started by: arumugavelvelu
5 Replies

10. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
JOT(1)							    BSD General Commands Manual 						    JOT(1)

NAME
jot -- print sequential or random data SYNOPSIS
jot [-cnr] [-b word] [-w word] [-s string] [-p precision] [reps [begin [end [s]]]] DESCRIPTION
The jot utility is used to print out increasing, decreasing, random, or redundant data, usually numbers, one per line. The following options are available: -r Generate random data instead of the default sequential data. -b word Just print word repetitively. -w word Print word with the generated data appended to it. Octal, hexadecimal, exponential, ASCII, zero padded, and right-adjusted represen- tations are possible by using the appropriate printf(3) conversion specification inside word, in which case the data are inserted rather than appended. -c This is an abbreviation for -w %c. -s string Print data separated by string. Normally, newlines separate data. -n Do not print the final newline normally appended to the output. -p precision Print only as many digits or characters of the data as indicated by the integer precision. In the absence of -p, the precision is the greater of the precisions of begin and end. The -p option is overridden by whatever appears in a printf(3) conversion following -w. The last four arguments indicate, respectively, the number of data, the lower bound, the upper bound, and the step size or, for random data, the seed. While at least one of them must appear, any of the other three may be omitted, and will be considered as such if given as - or as an empty string. Any three of these arguments determines the fourth. If four are specified and the given and computed values of reps con- flict, the lower value is used. If fewer than three are specified, defaults are assigned left to right, except for s, which assumes a default of 1 or -1 if both begin and end are given. Defaults for the four arguments are, respectively, 100, 1, 100, and 1, except that when random data are requested, the seed, s, is picked randomly. The reps argument is expected to be an unsigned integer, and if given as zero is taken to be infinite. The begin and end argu- ments may be given as real numbers or as characters representing the corresponding value in ASCII. The last argument must be a real number. Random numbers are obtained through arc4random(3) when no seed is specified, and through random(3) when a seed is given. When jot is asked to generate random integers or characters with begin and end values in the range of the random number generator function and no format is specified with one of the -w, -b, or -p options, jot will arrange for all the values in the range to appear in the output with an equal prob- ability. In all other cases be careful to ensure that the output format's rounding or truncation will not skew the distribution of output values in an unintended way. The name jot derives in part from iota, a function in APL. EXIT STATUS
The jot utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The command jot - 1 10 prints the integers from 1 to 10, while the command jot 21 -1 1.00 prints 21 evenly spaced numbers increasing from -1 to 1. The ASCII character set is generated with jot -c 128 0 and the strings xaa through xaz with jot -w xa%c 26 a while 20 random 8-letter strings are produced with jot -r -c 160 a z | rs -g 0 8 Infinitely many yes's may be obtained through jot -b yes 0 and thirty ed(1) substitution commands applying to lines 2, 7, 12, etc. is the result of jot -w %ds/old/new/ 30 2 - 5 The stuttering sequence 9, 9, 8, 8, 7, etc. can be produced by suitable choice of step size, as in jot - 9 0 -.5 and a file containing exactly 1024 bytes is created with jot -b x 512 > block Finally, to set tabs four spaces apart starting from column 10 and ending in column 132, use expand -`jot -s, - 10 132 4` and to print all lines 80 characters or longer, grep `jot -s "" -b . 80` DIAGNOSTICS
The following diagnostic messages deserve special explanation: illegal or unsupported format '%s' The requested conversion format specifier for printf(3) was not of the form %[#][ ][{+,-}][0-9]*[.[0-9]*]? where ``?'' must be one of [l]{d,i,o,u,x} or {c,e,f,g,D,E,G,O,U,X} range error in conversion A value to be printed fell outside the range of the data type associated with the requested output format. too many conversions More than one conversion format specifier has been supplied, but only one is allowed. SEE ALSO
ed(1), expand(1), rs(1), seq(1), yes(1), arc4random(3), printf(3), random(3) HISTORY
The jot utility first appeared in 4.2BSD. BSD
February 19, 2010 BSD
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy