Solved

shell syntax and file copy syntax AIX IBM

Posted on 2014-02-12
3
524 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
Comment Utility
# 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

763 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

11 Experts available now in Live!

Get 1:1 Help Now