Sponsored Content
Top Forums Shell Programming and Scripting work area directory jumping script? Post 302339205 by jvan on Thursday 30th of July 2009 04:25:52 AM
Old 07-30-2009
work area directory jumping script?

hi all,

Ive been trying to find some way of doing this for ages but i have is a shell script that activates a python search and there it no tab completion. more familliar with tcsh at the moment but i'm a newbe.

i was trying to make an easy way to browse to a list of working directories.

say i had the following folder /work/template/clothing/.

now in this folder i have say folders named
shirt
pants
shoes
hat
tie
so the ties full path would be /work/template/clothing/tie

what i want to do is to have some way of jumping to the different dir paths with one command

eg "work" being the script command and the first argument being which folder.

so in the shell type "work pants"

should get me to /work/template/clothing/pants

i can set up separate cdpath command but i have lot of directories and it would be nice to have a TAB completion.

surely this is a common script. is there one out there i can look at.

any ideas would be great. i dont know what this would be called to do the apopriate search

cheers

john
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Jumping to next line with awk

I am defining an awk function (Solaris v8 ksh) of: function firstletter { echo "$line" | awk '{get=substr($1,1,1);print get}' | read FL } I am starting a wile loop with a: for line in `cat inputfile.lst` When I call the function from within the for loop it works great fine. From within... (4 Replies)
Discussion started by: gozer13
4 Replies

2. Shell Programming and Scripting

script to loop and check jumping seq.

Hi, Normally, I will manually to use "ll" command to list the following file from \FILE\CACHE\ directory and check the jump seq. Can I write a script to loop or/and check jump seq file (if jumped seq and show "missing seq no" message for me) -rw-rw----+ 1 user develop 14012 Sep 4... (1 Reply)
Discussion started by: happyv
1 Replies

3. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

4. Programming

Jumping to a particular line in a file

Hi, I have an output file which has more than 1,000,000,000 lines. I am accessing this file in another C++ program. Now while accessing the output file using cin, I want to jump, say, to the 5,000,000th line directly and start accessing data from there. Is this possible? Could someone please... (4 Replies)
Discussion started by: mugga
4 Replies

5. BSD

Jumping from Solaris to BSD?

Hi all, I currently run an OpenSolaris (b134) server at home for share media between a few computers (all Macs at the moment). I use ZFS to mirror a couple of disks and have a couple of SMF manifests. My background is as a user of OS X and as a user of (Open)Solaris with formal training in... (7 Replies)
Discussion started by: forquare
7 Replies

6. Solaris

jumping from one line to another

Hi, Thanks (10 Replies)
Discussion started by: rocky1954
10 Replies

7. Shell Programming and Scripting

How to work with one directory at a time?

I have a backup folder that has sub folders created daily. Each sub-folder contains files for that specific day. I need to search all those files to see which ones contains a specific phrase. I also need to take that phrase and output to a text file for that day. This can be done with a one liner,... (3 Replies)
Discussion started by: bbbngowc
3 Replies

8. Shell Programming and Scripting

Why doesn't piping ls to cd work if there's only one directory?

Hey guys. If I'm in a directory with only one directory, for example: foo@bar:/$ ls really-complicated-or-long-dir-name Why wouldn't piping this single line of output into cd work? foo@bar:/$ ls | cd I'm just getting started with the shell and I was trying to navigate into a directory with a... (1 Reply)
Discussion started by: Hipster
1 Replies

9. Shell Programming and Scripting

My script work on Linux but not work in sunos.

My script work on Linux but not work in sun os. my script. logFiles="sentLog1.log sentLog2.log" intial_time="0 0" logLocation="/usr/local/tomcat/logs/" sleepTime=600 failMessage=":: $(tput bold)Log not update$(tput rmso) = " successMessage="OK" arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies

10. Shell Programming and Scripting

Bash script jumping too quickly to the next command - crash

Hi, (I am not too good in command-lines). I am running a bash script and at some point my loop starts to run super quickly. Then, the steps after do not get processed and there is no further outpout generated. I tried with the sleep 20s option, as I thought some steps would get overlapped, but... (22 Replies)
Discussion started by: tremblayemilie9
22 Replies
folders(1mh)															      folders(1mh)

Name
       folders - list folders and contents

Syntax
       folders [ +folder ] [ msg ] [ options ]

Description
       The command displays the names of your folders and the number of messages that they each contain.

       The  command displays a list of all the folders in your Mail directory.	The folders are sorted alphabetically, each on its own line.  This
       is illustrated in the following example:
	 Folder      # of messages (  range  ); cur  msg  (other files)
	   V2.3  has	3 messages (   1-   3).
	 adrian  has   20 messages (   1-  20); cur=   2.
	  brian  has   16 messages (   1-  16).
	  chris  has   12 messages (   1-  12).
	copylog  has  242 messages (   1- 242); cur= 225.
	  inbox+ has   73 messages (   1- 127); cur= 127.
	    int  has	4 messages (   1-   4); cur=   2  (others).
	   jack  has   17 messages (   1-  17); cur=  17.

		 TOTAL= 387 messages in 8 folders.
       The plus sign (+) after inbox indicates that it is the current folder.  The information about the folder includes the term (others).   This
       indicates  that the folder contains files which are not messages.  These files may be either sub-folders, or files that do not belong under
       the MH file naming scheme.

       The command is identical to the effect of using the -all option to the command.

       If you use with the +folder argument, it will display all the subfolders within the named folder.  as shown in the following example:
       % folders +test
       Folder		# of messages (  range	); cur	msg  (other files)
       test+ has	  18 messages (   1-  18);	     (others).
       test/testone has    1 message  (   1-   1).
       test/testtwo has   no messages.

	      TOTAL=   19 messages in 3 folders.
       See for more details of sub-folders.

Options
       -fast
       -nofast	 Lists only the name of folders, with no additional information.  This is faster because the folders need not be read.

       -help	 Prints a list of the valid options to this command.

       -list
       -nolist	 Lists the contents of the folder-stack.  No +folder argument is allowed with this option.

       -pack
       -nopack	 Re-numbers messages in the folders.  Messages are re-numbered sequentially, and any gaps  in  the  numbering  are  removed.   The
		 default operation is -nopack, which does not change the numbering in the folder.

       -pop	 Discards  the	top of the folder-stack, after setting the current folder to that value.  No +folder argument is allowed with this
		 option.  This corresponds to the operation in the C-shell; see The -push and -pop options are mutually exclusive: the last occur-
		 rence of either one overrides any previous occurrence of the other.

       -push	 Pushes  the  current  folder  onto  the  folder-stack, and makes the +folder argument into the current folder.  If +folder is not
		 given, the current folder and the top of the folder-stack are exchanged.  This corresponds to the operation in the  C-shell;  see
		 The  -push switch and the -pop switch are mutually exclusive: the last occurrence of either one overrides any previous occurrence
		 of the other.

       -recurse
       -norecurse
		 Lists folders recursively.  Information on each folder is displayed, followed by information on any  sub-folders  which  it  con-
		 tains.

       -total
       -nototal  Displays  only the total number of messages and folders in your Mail directory.  This option does not print any information about
		 individual folders.  It can be suppressed using the -nototal option.

       The defaults for are:

	      +folder defaults to all
	      msg defaults to none
	      -nofast
	      -noheader
	      -nototal
	      -nopack
	      -norecurse

Restrictions
       MH does not allow you to have more than 100 folders at any level in your Mail directory.

Profile Components
       Path:		 To determine your MH directory
       Folder-Protect:	 To set protections when creating a new folder
       Folder-Stack:	 To determine the folder stack
       lsproc:		 Program to list the contents of a folder

Files
       The user profile.

See Also
       csh(1), folder(1mh), refile(1mh), mhpath(1mh)

																      folders(1mh)
All times are GMT -4. The time now is 05:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy