Sponsored Content
Full Discussion: BASH tr command help
Top Forums UNIX for Dummies Questions & Answers BASH tr command help Post 302337572 by radoulov on Friday 24th of July 2009 11:18:08 AM
Old 07-24-2009
No, you should use another tool (sed, perl, ...) for this.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Bash Command

In my script I use this command \c when printing(echo) out statements but this only works in the Korn Shell(ksh). I need the same command to be used in the Bash Shell, is there one out there? Thanks, the A. (1 Reply)
Discussion started by: Astudent
1 Replies

2. UNIX for Dummies Questions & Answers

Another Bash Command

This is sort of the same question I recently asked: In my script I'm outputing lines of various symbols. When I run my script it prints the information vertically. I need my script to print out horizontally. I know in the Korn shell you use \c, but it doesn't seem to work in bash - it will... (1 Reply)
Discussion started by: Astudent
1 Replies

3. Shell Programming and Scripting

Sort (bash command)

I did a search on this, and found lots on SORT but no answer to my question. I have a C program that fetches all of our users from Netware, and I have that it makes a file that I later include in a html as a select tag drop-down menu. Here is what 1 line looks like: <option... (5 Replies)
Discussion started by: booboo
5 Replies

4. Linux

Install bash command

Hello, I am trying to copy some dirs and files over from one part of my server to the other with groups, owners and permissions so . . . I am using the command: install -m <777> -o <owner> -g <group> /<source>/* /<destination> This works fine for the files but gives me "install:... (1 Reply)
Discussion started by: dave_c00
1 Replies

5. AIX

Typing "bash" at the command line spawns two bash processes

Server: IBM p770 OS: AIX 6.1 TL5 SP1 When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
Discussion started by: wjssj
2 Replies

6. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

7. Shell Programming and Scripting

bash: <command nm> command not found

I created a script that I need to run from time to time, but get this error message. To get it working again I run this command from time to time: export PATH="$PATH:~/scripts" I put all my automated scripts in the /scripts directory and would like to run my scripts from any directory... (5 Replies)
Discussion started by: catalinawinemxr
5 Replies

8. Shell Programming and Scripting

bash:getopts command help

How can I say one of the options is required? can I use an if statement? let say: while getopts ":c:u:fp" opt; do case $opt in c) echo "-c was triggered, Parameter: $OPTARG" >&2;; u) echo "-u was triggered, Parameter: $OPTARG" >&2;; f) echo "-u was triggered,... (2 Replies)
Discussion started by: bashily
2 Replies

9. Shell Programming and Scripting

Cp command works on command line but not in bash

The below command moves all the .vcf files into the directory. cp /home/cmccabe/Desktop/test/vcf/overall/stats/*.vcf /home/cmccabe/Desktop/NGS/annovar When I use a bash wrapper the target.txt gets created but the text files do not get copied. All the paths are the same, but not sure why... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies
XATTR(1)						    BSD General Commands Manual 						  XATTR(1)

NAME
xattr -- display and manipulate extended attributes SYNOPSIS
xattr [-lrsvx] file ... xattr -p [-lrsvx] attr_name file ... xattr -w [-rsx] attr_name attr_value file ... xattr -d [-rsv] attr_name file ... xattr -c [-rsv] file ... xattr -h | --help DESCRIPTION
The xattr command can be used to display, modify or remove the extended attributes of one or more files, including directories and symbolic links. Extended attributes are arbitrary metadata stored with a file, but separate from the filesystem attributes (such as modification time or file size). The metadata is often a null-terminated UTF-8 string, but can also be arbitrary binary data. One or more files may be specified on the command line. For the first two forms of the command, when there are more than one file, the file name is displayed along with the actual results. When only one file is specified, the display of the file name is usually suppressed (unless the -v option described below, is also specified). In the first form of the command (without any other mode option specified), the names of all extended attributes are listed. Attribute names can also be displayed using ``ls -l@''. In the second form, using the -p option (``print''), the value associated with the given attribute name is displayed. Attribute values are usually displayed as strings. However, if nils are detected in the data, the value is displayed in a hexadecimal representation. The third form, with the -w option (``write''), causes the given attribute name to be assigned the given value. The fourth form, with the -d option (``delete''), causes the given attribute name (and associated value), to be removed. In the fifth form, with the -c option (``clear''), causes all attributes (including their associated values), to be removed. Finally, the last form, with either the -h or --help option, displays a short help message and exits immediately. OPTIONS
-l By default, the first two command forms either displays just the attribute names or values, respectively. The -l option causes both the attribute names and corresponding values to be displayed. For hexadecimal display of values, the output is preceeded with the hexadeci- mal offset values and followed by ASCII display, enclosed by ``|''. -r If a file argument is a directory, act as if the entire contents of the directory recursively were also specified (so that every file in the directory tree is acted upon). -s If a file argument is a symbolic link, act on the symbolic link itself, rather than the file that the symbolic link points at. -v Force the the file name to be displayed, even for a single file. -x Force the attribute value to be displayed in the hexadecimal representation. The -w option normally assumes the input attribute value is a string. Specifying the -x option causes xattr to expect the input in hexa- decimal (whitespace is ignored). The xxd(1) command can be used to create hexadecimal representations from exising binary data, to pass to xattr. EXIT STATUS
The xattr command exits with zero status on success. On error, non-zero is returned, and an error message is printed to the standard error. For system call errors, both the error code and error string are printed (see getxattr(2), listxattr(2), removexattr(2) and setxattr(2) for a complete list of possible error codes). Some attribute data may have a fixed length that is enforced by the system. For example, % xattr -w com.apple.FinderInfo 0 foo xattr: [Errno 34] Result too large: 'foo' The com.apple.FinderInfo attribute must be 32 bytes in length. EXAMPLES
This example copies the com.apple.FinderInfo attribute from the /usr directory to the MyDir directory: % xattr -px com.apple.FinderInfo /usr 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 % xattr -l MyDir % xattr -wx com.apple.FinderInfo "`xattr -px com.apple.FinderInfo /usr`" MyDir % xattr -l MyDir com.apple.FinderInfo: 00000000 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 |........@.......| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000020 SEE ALSO
ls(1), xxd(1), getxattr(2), listxattr(2), removexattr(2), setxattr(2) BSD
Nov 29, 2010 BSD
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy