• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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