Solved

shell syntax and file copy syntax AIX IBM

Posted on 2014-02-12
3
527 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now