Sponsored Content
Top Forums Shell Programming and Scripting Iterate over `dirs` in a bash script Post 303033133 by RudiC on Saturday 30th of March 2019 01:29:06 PM
Old 03-30-2019
Please become accustomed to provide decent context info of your problem.

It is always helpful to carefully and detailedly phrase a request, and to support it with system info like OS and shell, related environment (variables, directory structures, options), preferred tools, adequate (representative) sample input and desired output data and the logics connecting the two including your own attempts at a solution, and, if existent, system (error) messages verbatim, to avoid ambiguities and keep people from guessing.

Where are you stuck? Running your given script yields
Code:
Key:  /home/myuser 
Key:  /etc 
Key:  /usr/local 
Key:  /usr

on my system. Even the exotic ${arr[$i]+7} doesn't give an error message (but doesn't evaluate to something sensible either) .
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to create dirs

hi, I would like to know of a shell script to create the following A script which will take in two parameters i.e. name of file and SID and create directories named /opt/oracle/admin/$SID/{bdump,cdump,udump}. Then edit the init file and change the three lines that look like this. ... (2 Replies)
Discussion started by: sjajimi
2 Replies

2. UNIX for Dummies Questions & Answers

Iterate a min/max awk script over time-series temperature data

I'm trying to iterate a UNIX awk script that returns min/max temperature data for each day from a monthly weather data file (01_weath.dat). The temperature data is held in $5. The temps are reported each minute so each day contains 1440 temperature enteries. The below code has gotten me as far as... (5 Replies)
Discussion started by: jgourley
5 Replies

3. Shell Programming and Scripting

script find files in two dirs HELP

I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below) TST_SHU_00014460_20090302.txt TST_SHU_00016047_20090302.txt TST_SHU_00007838_20090303.txt TST_SHU_00056485_20090303.txt TST_SHU_00014460_20090303.txt... (2 Replies)
Discussion started by: fierusbentus
2 Replies

4. Shell Programming and Scripting

perl script chokes on dirs with spaces

Basically, I have a perl script that calls enables one to resume where a video file left off (i.e. where the user stopped playback) that chokes on files that are located in a path that contains spaces. To make the situation a little more complicated, the perl script gets help from a bash script... (6 Replies)
Discussion started by: audiophile
6 Replies

5. UNIX for Advanced & Expert Users

script to recursively change permissions on file and dirs differently?

Hi there, I need to change all files/dirs 1. all files with 744 2. all dirs with 755 is there a script for that ? thanks, thegunman (13 Replies)
Discussion started by: TheGunMan
13 Replies

6. Shell Programming and Scripting

Need script to count specific word and iterate over number of files.

Hi Experts, I want to know the count of specific word in a file. I have almost 600+ files. So I want to loop thru each file and get the count of the specific word. Please help me on achieving this... Many thanks (2 Replies)
Discussion started by: elamurugu
2 Replies

7. UNIX for Dummies Questions & Answers

**HELP** how to do a listing of dirs and all sub dirs only

I am trying to get a listing of ALL directories only under /export (as an example). I can get all the dirs directly under /export but I need any sub dirs under those dirs. I've looked (here and google) but can not find anything that works (4 Replies)
Discussion started by: bbraml
4 Replies

8. Shell Programming and Scripting

script to iterate

Hi i need to find x in the following equation such that it satisfies this condition: y/x-ln(x)-1.24=0 how can i write a script to iterate to give random x to satisfy this equation. y is different each time too. any help with awk/shell script will be awesome! thanks (1 Reply)
Discussion started by: saint2006
1 Replies

9. UNIX for Dummies Questions & Answers

Script to iterate all command line arguments

Hi guys, I am having trouble with this script. What i want it to do is to iterate all command line arguments in reverse order. The code below does this fine but i need the output to print the words on separate lines instead of one line: #!/bin/bash #Takes in the arguments and displays them... (7 Replies)
Discussion started by: pipeline2012
7 Replies

10. UNIX for Beginners Questions & Answers

Script to iterate over several options

Have two 3 files which has list of servers,users and location and base url which is common on every server A = server1 server2 server3 B = user1 user2 user3 C = dom1 dom2 dom3 baseurl=/opt/SP/ and what i have to achieve is below via ssh from REMOTE SERVER for it's first iteration it... (7 Replies)
Discussion started by: abhaydas
7 Replies
tpm_restrictpubek(8)					      System Manager's Manual					      tpm_restrictpubek(8)

							TPM Management - tpm_restrictpubek

NAME
tpm_restrictpubek - restrict the ability to display the public portion of the Endorsement Key to the owner SYNOPSIS
tpm_restrictpubek [OPTION] DESCRIPTION
tpm_restrictpubek reports the status of who can display the public portion of the Endorsement Key. This is the default behavior and also available with the --status option. This operation will be in effect until the owner is cleared and prompts for the owner passord. With the --restrict option, the ability to display the public portion of the Endorsement Key is resticted to the owner (via the TPM_DisablePubekRead API). The command prompts for the owner password to complete the operation. The --status and --restrict options are mutually exclusive and the last one on the command line will be carried out. -h, --help Display command usage info. -v, --version Display command version info. -l, --log [none|error|info|debug] Set logging level. -u, --unicode Use TSS UNICODE encoding for passwords to comply with applications using TSS popup boxes -s, --status Display the status of who can see the public portion of the Endorsement Key -r, --restrict Restrict seeing the public portion of the Endorsement Key to the owner -z, --well-known Authenticate using 20 bytes of zeros as owner password (the default TSS Well Known Secret), instead of prompting for an owner password. SEE ALSO
tpm_version(1), tpm_takeownership(8), tpm_getpubek(8), tcsd(8) REPORTING BUGS
Report bugs to <trousers-users@lists.sourceforge.net> TPM Management 2005-05-05 tpm_restrictpubek(8)
All times are GMT -4. The time now is 03:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy