Solved

shell syntax and file copy syntax AIX IBM

Posted on 2014-02-12
3
534 Views
Last Modified: 2014-02-12
what does the # character represent in an AIX IBM shell command?

Also can you give an example of how to copy the contents of an AIX IBM file into a text file via a shell command?
0
Comment
Question by:pma111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 39853096
# generally represents a comment
#!  however is called shebang and tells the script location of the interpreter
eg  #!/bin/ksh

if you want to copy file
cp filename newfilename

Or

cat filename > newfilename
0
 
LVL 3

Author Comment

by:pma111
ID: 39853106
if you ran

# grep SYSTEM /etc/security/user > 123.txt within a shell, would it work, or would the # comment out the command?

or put another way would
grep SYSTEM /etc/security/user >123.txt

work / run ok?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 39853117
On the shell, if you are hitting the enter/return key and you get #, I think you are talking about the prompt sign

You can change it if you say

PS1="> "

To change it to > if you like.

Yes, if you are putting # yourself, that would comment it and it would therefore not run.

grep SYSTEM /etc/security/user >123.txt   work/run

YES
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question