Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

a sed script

Need a script.
Make a list of files in /usr/bin that have the letter "a" as the second character. Put the result in a temporary file.
0
zhshqzyc
Asked:
zhshqzyc
  • 2
2 Solutions
 
omarfaridCommented:
try

ls /usr/bin/?a* > /tmp/myfile
0
 
zhshqzycAuthor Commented:
Can we use sed?
0
 
point_pleasantCommented:
ls | sed -n '/^.[a|A].*$/p'
0
 
point_pleasantCommented:
sorry forgot redirect

 ls /usr/bin | sed -n '/^.[a|A].*$/p' >/tmp/filetmp
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now