Sponsored Content
Full Discussion: Ls command options
Top Forums UNIX for Beginners Questions & Answers Ls command options Post 302984289 by Don Cragun on Monday 24th of October 2016 03:21:50 AM
Old 10-24-2016
All of the following assume that you are not looking for "hidden" files (i.e., files with names starting with a period)... For files with names containing "a":
Code:
ls -d -- *a*

For files with names starting with "a":
Code:
ls -d a*

For files with names ending with "a":
Code:
ls -d -- *a

For files with names containing "a" but not as the first or last character:
Code:
ls -d -- [^a]*a*[^a]

This User Gave Thanks to Don Cragun For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Split Command options

HI! All iam using Split command to split a large .txt file in to smaller files, The syntax iam using split -25000 Product.txt iam getting four output files but not in .txt format but in some other format , when i checked the properties the Type of the output files is Type can any... (7 Replies)
Discussion started by: mohdtausifsh
7 Replies

2. Shell Programming and Scripting

how to? launch command with string of command line options

my description from another thread... here's my code: #!/bin/bash IFS=$'\n' function OutputName() { input=$1 echo $input input=`echo "$input" | sed -e 's/.//'` input=`echo "$input".avi` output_name=$input } if ]; then echo... (5 Replies)
Discussion started by: TinCanFury
5 Replies

3. HP-UX

Linux - HP UX Command options

Just I gone with the script, I found some command's options which are not compatible with " HP-UX ". If I found any alternate commands to the following, most probably I will solve the issue here. 1. " iostat -x " --> this command's option( x ) is not available in HP-UX... (2 Replies)
Discussion started by: pk_eee
2 Replies

4. Shell Programming and Scripting

Restricting the ls command options

Hi I want the 'ls' command to display only the file size,date modified and name of the file.What i could see with different options is this: $ls -got packagecount.csv $-rwxrwxrwx 1 393137 Aug 21 14:46 packagecount.csv Now what should be my possible... (4 Replies)
Discussion started by: sushovan
4 Replies

5. Shell Programming and Scripting

Need to disable options from a command

Hi, I am working on a Linux machine. I need to disable 2 options from the available 6 options of a command. For eg. in the "ls" command we have various options like "l ,r, t, a, .... " From this, I need to disable option "a" So when the users type in "ls -a", they should get an error or... (4 Replies)
Discussion started by: aster007
4 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. UNIX for Dummies Questions & Answers

Override options of rm command

How can i override options of rm command ?? and how can i implement my own options when we delete file using rm commad it will not delete file it has to move some folder....plz suggest some solution. (10 Replies)
Discussion started by: arun508.gatike
10 Replies

8. Shell Programming and Scripting

Reading command options one by one

Hi, Just some questions on the script below...? Given: bash-2.03$ command -a option1 name1 name2 ParseOptions() { local Len=${#@} local Ctr=2 #always start at 2 local Name=() local Iter=0 while ; do if <- Is this correct? so I can get the $2... (2 Replies)
Discussion started by: h0ujun
2 Replies

9. Shell Programming and Scripting

Help executing command with options

Hi, I have this command in a shell script and I can get it to echo ok, but when I try to execute the command I get a "file not found" error. Which is strange because, if I copy and paste the same command at the cli it works ok. What am I doing wrong please? (16 Replies)
Discussion started by: bbbngowc
16 Replies
sethead(1)						      General Commands Manual							sethead(1)

Name
       sethead - Set FITS or IRAF header keyword values

Synopsis
       sethead [-dknv][r letter] <FITS or IRAF file> kw1=val1 kw2=val2 ... kwn=valuen

Description
       Set parameters in the header of a FITS or IRAF image.  If the keywords do not already exist, they are added at the end of the header.  Val-
       ues are assumed to be numeric if they contain no alphabetic characters and right-aligned.  Otherwise they are left-aligned after the equals
       sign,  and padded by spaces to a minimum of 8 characters.  To set keywords in a list of files, substitute @<listfile> for the file names on
       the command line.  To set a lot of keywords, put them, one per line, in a file and substitute @<keylistfile> on the command line.  If two @
       commands  are  present,	the  program  will figure out which contains file names and which contains keywords.  Lines in a keyword list file
       which do not contain an = are ignored.

Options
       -h     Write HISTORY line into output header with sethead version, current date and time, and names of keywords set.

       -k     Write SETHEAD keyword into output header with sethead version, current date and time, and names of keywords set.	If a SETHEAD  key-
	      word already exists, move the old value to a HISTORY line before writing the new value

       -n     Write a new file with an added "e" before the extension.

       -r letter
	      Rename  existing keywords whose values are being reset by prepending the character "letter".  Drop the last character if the changed
	      keyword is already 8 characters long.

       -v     Print confirmations of each parameter setting

Web Page
       http://tdc-www.harvard.edu/software/wcstools/sethead.html

Author
       Doug Mink, SAO (dmink@cfa.harvard.edu)

6 July 2001							     WCSTools								sethead(1)
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy