I'm not very familiar with the ssh command. When I tried to set a variable and then echo its value on a remote machine via ssh, I found a problem. For example,
$ ITSME=itsme
$ ssh xxx.xxxx.xxx.xxx "ITSME=itsyou; echo $ITSME"
itsme
$ ssh xxx.xxxx.xxx.xxx 'ITSME=itsyou; echo $ITSME'
itsyou
$... (3 Replies)
Hi gurus,
I'd like to know your opions about Single Sign On (SSO) for linux (Debian). In my company, clients want to access to different services (FTP, HTTP, Mail, Web Applications ). I think about OpenLDAP and Proxy (Squid, Vulture) to resolve this problem but i'm not sure if they can. Are there... (0 Replies)
Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes
here is the sed line
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/"
can some one give the equivalent to the above script in single quotes
Thanks a ton (5 Replies)
Unix superusers,
I am new to unix but would like to learn more about grep. I am very familiar with regular expressions as i have used them for searching text files in windows based text editors. Since I am not very familiar with Unix, I dont understand when one should use GREP with the... (2 Replies)
Hi,,
Let example cmd: $$config/all
Here I want to replace or subsitute blank space and also with any other character in place of "$" sign...and also want to replace backslash (/) with forward (\)......in expect script
please could any one help on this.....thank you (2 Replies)
Hi I want to replace single quote with two single quotes in a perl string.
If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Hello. I'm trying to write a bash script that uses GNU screen and have hit a brick wall that has cost me many hours... (I'm sure it has something to do with quoting/globbing, which is why I post it here)
I can make a script that does the following just fine:
test.sh:
#!/bin/bash
# make... (2 Replies)
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Hi experts. I want to setup a training lab.
I have a Power 5 standalone server 9110-51A (p5 510)
I want to enable PowerVM on it and create two LPARs
I don't have money for an HMC
I know I can use IVM instead
I understand IVM is part of the VIOS software
TWO QUESTIONS:
1- If... (12 Replies)
I'm looking at a config file with dollar signs. What do the dollar signs mean in front of a directory?
dir = ./demoCA # Where everything is kept
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
new_certs_dir = $dir/newcerts # default... (1 Reply)
Discussion started by: cokedude
1 Replies
LEARN ABOUT SUNOS
cat
cat(1) User Commands cat(1)NAME
cat - concatenate and display files
SYNOPSIS
cat [-nbsuvet] [file...]
DESCRIPTION
The cat utility reads each file in sequence and writes it on the standard output. Thus:
example% cat file
prints file on your terminal, and:
example% cat file1 file2 >file3
concatenates file1 and file2, and writes the results in file3. If no input file is given, cat reads from the standard input file.
OPTIONS
The following options are supported:
-n Precede each line output with its line number.
-b Number the lines, as -n, but omit the line numbers from blank lines.
-u The output is not buffered. (The default is buffered output.)
-s cat is silent about non-existent files.
-v Non-printing characters (with the exception of tabs, new-lines and form-feeds) are printed visibly. ASCII control characters
(octal 000 - 037) are printed as ^n, where n is the corresponding ASCII character in the range octal 100 - 137 (@, A, B, C, . . .,
X, Y, Z, [, , ], ^, and _); the DEL character (octal 0177) is printed ^?. Other non-printable characters are printed as M-x,
where x is the ASCII character specified by the low-order seven bits.
When used with the -v option, the following options may be used:
-e A $ character will be printed at the end of each line (prior to the new-line).
-t Tabs will be printed as ^I's and formfeeds to be printed as ^L's.
The -e and -t options are ignored if the -v option is not specified.
OPERANDS
The following operand is supported:
file A path name of an input file. If no file is specified, the standard input is used. If file is `-', cat will read from the
standard input at that point in the sequence. cat will not close and reopen standard input when it is referenced in this
way, but will accept multiple occurrences of `-' as file.
USAGE
See largefile(5) for the description of the behavior of cat when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
EXAMPLES
Example 1: Concatenating a file
The following command:
example% cat myfile
writes the contents of the file myfile to standard output.
Example 2: Concatenating two files into one
The following command:
example% cat doc1 doc2 > doc.all
concatenates the files doc1 and doc2 and writes the result to doc.all.
Example 3: Concatenating two arbitrary pieces of input with a single invocation
The command:
example% cat start - middle - end > file
when standard input is a terminal, gets two arbitrary pieces of input from the terminal with a single invocation of cat. Note, however,
that if standard input is a regular file, this would be equivalent to the command:
cat start - middle /dev/null end > file
because the entire contents of the file would be consumed by cat the first time `-' was used as a file operand and an end-of-file condition
would be detected immediately when `-' was referenced the second time.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of cat: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 All input files were output successfully.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO touch(1), attributes(5), environ(5), largefile(5), standards(5)NOTES
Redirecting the output of cat onto one of the files being read will cause the loss of the data originally in the file being read. For exam-
ple,
example% cat filename1 filename2 >filename1
causes the original data in filename1 to be lost.
SunOS 5.10 1 Feb 1995 cat(1)