Does anyone know what the microprograms behind cat (and other commands) are like? In what language are those programs designed? Is their source available somewhere?
No particular reason, just wondering.
I know it's a bit strange... (3 Replies)
hi all
i have some script
echo $$ > process-id
d='cat process-id'
if test-s "TMP"$d then
echo "serv1"
else
echo "serv2"
fi
the variable d should contain the number of the process,
instead of that it contains 'cat process-id'
how shall i do that the d will contain only the number?... (6 Replies)
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Hello,
I am trying to send text to a USB to serial adaptor and then to an external speech synthesizer. I tried using the cat and echo commands with no luck. I have gotten some audio output from my synthesizer using Kermit a terminal emulator, so I am pretty sure my synthesizer and my USB to serial... (1 Reply)
I am having problems getting a list of filenames that I want from a directory.
example: I have 3 files - filename.xxx.20110505.123030
filename.yyy.20110505.123030
filename.zzz.20110505.123030
There may be multiple xxx,... (3 Replies)
Can any one guide me how can i accomplish this by script
i continuously receive files via our ftp server into a certain folder is there a way i can take those files cat it to a new file by hour and create a new file when new hour starts? (4 Replies)
Can we concatenate say,
I have a few files prefixing with 2009...
So now i want all the 2009 files into one single file..
Can this be achieved???? (4 Replies)
hello! why this works?
cd /home/user
cat * | ecasound -i stdin -o jack
and this doesn't?
cd /home/user/somedirectory
cat * | ecasound -i stdin -o jack
somedirectory are full with exe files which are the best source for this sort of noise thing (10 Replies)
Apologies, probably a really simple problem:
I've got a text file (nh.txt) with this in it:
user1 email1 email2
user2 email1 email2
etc
With the following basic script:
for tline in $(cat nh.txt)
do
echo "**********"
echo $tline
done
... (3 Replies)
For the command below, I need to understand what exactly the command does and provide an examples for which the output will be saved to file save2... From my understanding, if the file provides an error in the first half of the pipe, it'll save to save1 and will never give an error to save to... (2 Replies)
Discussion started by: ayz649
2 Replies
LEARN ABOUT SUNOS
echo
echo(1B) SunOS/BSD Compatibility Package Commands echo(1B)NAME
echo - echo arguments to standard output
SYNOPSIS
/usr/ucb/echo [-n] [argument]
DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output.
echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi-
ronment variables.
For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows:
o echo your current-working-directory's full pathname
o pipe the output through tr to translate the path's embedded slash-characters into space-characters
o pipe that output through wc -w for a count of the names in your path.
example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
See tr(1) and wc(1) for their functionality.
The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if
the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape
characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's
echo() also understands a as the audible bell character; however, these commands do not have an -n option.
OPTIONS -n Do not add the NEWLINE to the output.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases.
SunOS 5.10 3 Aug 1994 echo(1B)