Sponsored Content
Full Discussion: Setting path names
Top Forums Shell Programming and Scripting Setting path names Post 302620889 by kristinu on Monday 9th of April 2012 01:20:04 PM
Old 04-09-2012
This is the updated code

Code:
tree -fid | awk 'BEGIN{FS="/"; OFS="/"}; NF == 3 {print "cd "$0"; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../.." }'

This gives

Code:
cd ./tle2007/tle26n09; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../..
cd ./tle2007/tle26n10; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../.. 
cd ./tle2007/tle26n11; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../..
cd ./tle2007/tle26n12; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../.. 
cd ./tle2008/tle27n01; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../..
cd ./tle2008/tle27n02; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../..
cd ./tle2008/tle27n03; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year= *.html; cd ../..

---------- Post updated at 12:20 PM ---------- Previous update was at 11:34 AM ----------

Done it

Code:
tree -fid | awk 'BEGIN{FS="/"; OFS="/"}; NF == 3 {print "cd "$0"; /home/chrisd/srv/sunny/hstmy/bin/tcsh/georom_replaceText.tcsh --year="$2" *.html; cd ../.." }' | awk '{gsub(/"--year=geo"|"--year=tle"/,"--year="); print}'

which produces the correct output
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting path for GCC?

Dear all, I have downloaded the latest version of gcc --- gcc-3.3.1.tar.gz from gnu.org. My Linux distribution is Mandrake 9.0. This was how I installed it: su - passwrd: mkdir /usr/local/src cd /usr/local/src gunzip /tmp/gcc-3.3.1.tar.gz #where I downloaded the file tar xvf... (2 Replies)
Discussion started by: HOUSCOUS
2 Replies

2. UNIX for Dummies Questions & Answers

Setting $PATH for a particular file...????

:) dear members; I am trying to placea directory to keep minor records in particular directories.. rather than just rely on hard links.. I would like to set the $PATH variable so that I can access the directory itself from anywhere; ex./ /tmp or /bin /var... I know how to export enviromental... (4 Replies)
Discussion started by: moxxx68
4 Replies

3. UNIX for Dummies Questions & Answers

Help on setting path variable

Hi there, I need help on setting the path variable. How can I set the path variable with Bourne Shell. My scripts goes like this, but did not work. #!/bin/sh PATH=/usr/bin:/usr/ucb:/etc:/export/home/zchen/home export PATH Thanks, Z (4 Replies)
Discussion started by: randomcz
4 Replies

4. Shell Programming and Scripting

Setting path

Hi all, I have a java command in a shell script. When i m executing the command from the prompt its working fine. But when i paste the same command in a shell script and execute the shell script it says path not found. Please help. (5 Replies)
Discussion started by: radhika03
5 Replies

5. Shell Programming and Scripting

How do manipulate file path and names

In emacs elisp, there is a handy function called file-name-nondirectory which accepts a path and file name and returns just a file name and extension. There is also a function called file-name-directory which just returns the dire ctory name without the file. How can I implement these same... (2 Replies)
Discussion started by: siegfried
2 Replies

6. Shell Programming and Scripting

want only file names (not whole path) in shell script

hi i wrote following script, #!/usr/bin/sh for index in `ls /tmp/common/*.txt` do echo "$index" done here index is giving full path but in my program i want only file names (not along with whole path) Eg. if in /tmp/common files are a.txt and b.txt den out should be a.txt b.txt ... (6 Replies)
Discussion started by: crackthehit007
6 Replies

7. Shell Programming and Scripting

Setting up a path in UNIX

I have the following script "test". When i tried to execute it, I am not able to run it. I dunno why ? Then i tried getting the first few lines of the script which is displayed below: $head -10 test #!/bin/ksh PROG=$0;export PROG ORAUSER=`get_inf_env INFORM_DB_ACCOUNT`;export ORAUSER... (13 Replies)
Discussion started by: bobby1015
13 Replies

8. UNIX for Dummies Questions & Answers

Removing path name from list of file names

I have this piece of code printf '%s\n' $pth*.msf | tr ' ' '\n' | sort -t '-' -k7 -k6r \ | awk -F- '{c=($6$7!=p&&FNR!=1)?ORS:"";p=$6$7}{printf("%c%s\n",c,$0)}' When I run it I get /home/chrisd/tatsh/branches/terr0.50/darwin/n02-z30-dsr65-terr0.50-dc0.002-8x6drw-csq.msf... (8 Replies)
Discussion started by: kristinu
8 Replies

9. UNIX for Dummies Questions & Answers

Setting up a private path

Hi all, This is probably a very simple question but I couldn't even think of how to phrase it intelligently so google could tell me the answer. Basically I am a user on a server, I am not the admin and do not have root privileges. I have downloaded a bunch of programs that I need to use and... (2 Replies)
Discussion started by: DavyK1984
2 Replies
ttk::frame(n)							 Tk Themed Widget						     ttk::frame(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::frame - Simple container widget SYNOPSIS
ttk::frame pathName ?options? _________________________________________________________________ DESCRIPTION
A ttk::frame widget is a container, used to group other widgets together. STANDARD OPTIONS
-class -cursor -takefocus -style See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-borderwidth borderWidth] The desired width of the widget border. Defaults to 0. [-relief relief] One of the standard Tk border styles: flat, groove, raised, ridge, solid, or sunken. Defaults to flat. [-padding padding] Additional padding to include inside the border. [-width width] If specified, the widget's requested width in pixels. [-height height] If specified, the widget's requested height in pix- els. WIDGET COMMAND
Supports the standard widget commands configure, cget, identify, instate, and state; see ttk::widget(n). NOTES
Note that if the pack, grid, or other geometry managers are used to manage the children of the frame, by the GM's requested size will nor- mally take precedence over the frame widget's -width and -height options. pack propagate and grid propagate can be used to change this. SEE ALSO
ttk::widget(n), ttk::labelframe(n), frame(n) KEYWORDS
widget, frame, container Tk 8.5 ttk::frame(n)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy