Sponsored Content
Top Forums Shell Programming and Scripting looping and saving output of each line separately Post 302667081 by Corona688 on Thursday 5th of July 2012 03:19:31 PM
Old 07-05-2012
Whether it's the right approach or not really depends on what perm does. It might be the right approach. It might not. We literally have no idea.

Until you explain what perm actually does -- the input you feed into it and the output you expect from it -- we can't help you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Saving output from awk into a perl variable

How would I pass awk output to a perl variable? For example, I want to save the value in the 4th column into the variable called test. My best guess is something as follow, but I am sure this isn't correct. $test = system("awk '/NUMBER/{print \$4}' $_"); (8 Replies)
Discussion started by: userix
8 Replies

2. UNIX for Dummies Questions & Answers

saving command output to a variable

Hello, I have a shell script containing a command string in the following format: command1 | command2 | cut -c9-16 The output from this is a record number (using characters 9-16 of the original output string) e.g. ORD-1234 I wish to save this value to a variable for use in later commands... (4 Replies)
Discussion started by: philjo
4 Replies

3. UNIX for Dummies Questions & Answers

Saving a temporary output within a script

Good morning everyone, i am looking to know how to save the output of a command and reuse it again within a script i already tired this one but it didn't work TEMPDIR=/dir1/dir2 My_command> $TEMPDIR/$TEMPFILE rm $TEMPDIR/$TEMPFILE* it keeps saying "cannot write to a... (15 Replies)
Discussion started by: Portabello
15 Replies

4. Shell Programming and Scripting

saving output from bash into a file

I am ssh to many servers to get some information... however sometimes the server is unreacheable and i am getting an error. I want to save that output to a file but I am not able to do so... I want to be able to save output of bash into a file.. so when I run this command on a script ssh... (5 Replies)
Discussion started by: eponcedeleonc
5 Replies

5. Shell Programming and Scripting

Need some Help for file filteration and saving the output in other directory

Hi all........ Plss do help me.......in a big trouble... :wall::wall::wall: I have 3 directories named as :1. /home/shuchi/source 2./home/shuchi/destination 3./home/shuchi/filter now the problem is /home/shuchi/source has say 2 files with extension .txt as given below : A.txt msisdn ... (5 Replies)
Discussion started by: ektubbe
5 Replies

6. Shell Programming and Scripting

Read each line and saving the line in separate files

Hi Experts, I am having a requirement like this; Input file EIM_ACCT.ifb|1001|1005 EIM_ADDR.ifb|1002|1004 EIM_ABD.ifb|1009|1007 I want to read each line of this file and pass each line,one at a time,as an argument to another script. eg; 1.read first line->store it to a file->call... (2 Replies)
Discussion started by: ashishpanchal85
2 Replies

7. Shell Programming and Scripting

Looping over output of 'ls'

Hi, I have some output from 'ls' command and I want to loop over the output in a bash script. What would be a good way to go about it? For example, if the output of the ls command gives me 'prefix1 prefix2 prefix3', how can I set a loop that will iterate over these? many thanks! (5 Replies)
Discussion started by: pc2001
5 Replies

8. Shell Programming and Scripting

Saving files with file name as output

Hi, i need help with a file creation of an output program. I've got a program that with #find creates an output for each files in a directory. If i give this command : -o spec$(date -u +%Y%m%dt%H%M) it creates just one file, overwriting all the others since it is the creation date .... (2 Replies)
Discussion started by: Board27
2 Replies

9. Shell Programming and Scripting

sed command is saving output as blank file

Hi, I am working on a script where I am adding adding colors to few of the info in the output. Now , after that is done , I see colour codes in log files which I don't want to see.:mad::mad::mad::mad: So , I tried using sed command in script as below which gives me o/p (new.log) as blank file... (7 Replies)
Discussion started by: Dream4649
7 Replies

10. UNIX for Beginners Questions & Answers

Looping through input/output

Hi, I've got a directory of about 6000 txt files that look like this: a b c d e f g h k l m n I need to execute a command on them to combine them and, in the end, have one big file with all the needed columns taken form all the 6000 files. I've got the "combining" program, but my problem... (26 Replies)
Discussion started by: zajtat
26 Replies
LFC-GETACL(1)							 LFC User Commands						     LFC-GETACL(1)

NAME
lfc-getacl - get LFC directory/file access control lists SYNOPSIS
lfc-getacl [-a] [-d] path... DESCRIPTION
lfc-getacl gets the Access Control List associated with a LFC directory/file. For each path, it displays the file name, owner, the group, and the Access Control List (ACL) if present. If a directory has a default ACL, lfc-getacl also displays the default ACL. Regular files cannot have default ACLs. The output looks like: # file: filename # owner: username # group: groupname user::perm user:uid:perm group::perm group:gid:perm mask:perm other:perm default:user::perm default:user:uid:perm default:group::perm default:group:gid:perm default:mask:perm default:other:perm The first "user" entry gives the permissions granted to the owner of the file. The following "user" entries show the permissions granted to specific users, they are sorted in ascending order of uid. The first "group" entry gives the permissions granted to the group owner of the file. The following "group" entries show the permissions granted to specific groups, they are sorted in ascending order of gid. The "mask" entry is the maximum permission granted to specific users or groups. It does not affect the "owner" and "other" permissions. The "mask" entry must be present if there are specific "user" or "group" entries. "default" entries associated with a directory are inherited as access ACL by the files or sub-directories created in that directory. The umask is not used. Sub-directories also inherit the default ACL as default ACL. As soon as there is one default ACL entry, the 3 default ACL base entries (default user, default group, default other) must be present. The entry processing conforms to the Posix 1003.1e draft standard 17. path specifies the LFC pathname. If path does not start with /, it is prefixed by the content of the LFC_HOME environment variable. uid is displayed as the username if known else as the numeric id. gid is displayed as the groupname if known else as the numeric id. perm is expressed as a combination of characters rwx- OPTIONS
-a only display the access ACL. -d only display the default ACL. EXAMPLES
lfc-getacl /grid/atlas/test/file.log/d2 # file: /grid/atlas/test/file.log/d2 # owner: baud # group: c3 user::rwx group::r-x #effective:r-x other::r-x default:user::rwx default:group::r-x default:other::r-x EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed. SEE ALSO
Castor_limits(4), lfc_chmod(3), lfc_chown(3) AUTHOR
LCG Grid Deployment Team LFC
$Date: 2005/03/02 08:32:12 $ LFC-GETACL(1)
All times are GMT -4. The time now is 05:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy