10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Team,
we use below command to store the contents in a logfile.
cat a.txt > a.log
a.txt content is
123
345
Is there any options available to store the command used also?
for eg a.log may show as
cat a.txt
123
345 (5 Replies)
Discussion started by: sid2013
5 Replies
2. Shell Programming and Scripting
Hi All,
Hoping you can help as im in desperate need... I'm very new to unix scripting so apoligies,
I have setup an expect script in order to log into a node on our network, This will provide an output as per the below
*********** information:
*************: n/a
TEST IP : n/a
... (18 Replies)
Discussion started by: mutley2202
18 Replies
3. UNIX for Dummies Questions & Answers
I use the cat command to concatenate text files, but one of the rows I was expecting doesn't display in the output file. Is there a verbose mode\logging mechanism for the cat command to help me investigate where the lines I was expecting are going??
cat 7760-001_1_*_06_*.txt | grep -v... (1 Reply)
Discussion started by: Xin Xin
1 Replies
4. Programming
Dear All:
I am trying to do something that (I thought) was relatively straightforward, but my code snippet does not seem to work.
Any suggestions?
Thank you
Sincerely yours
Misha Koshelev
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include... (0 Replies)
Discussion started by: misha680
0 Replies
5. Shell Programming and Scripting
Hi All,
How do I provide the output of a command to another command which is waiting for an input from the user ?
Ex : I need to login to a device via telnet. In the script, initially I use the "read" command to get the IP Address, Username and Password of the device from the user. Now,... (1 Reply)
Discussion started by: sushant172
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: shira
21 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
8. Shell Programming and Scripting
I have a program that can be run in terminal, when its run it either returns SSH OK or CRITICAL, how do i use the output in my script?
good
./check_sh myserver
SSH OK
bad
./check_sh myserver
CRITICAL
I want to store it in a variable btw, SSH OK will give the variable $SSH=1 and if its... (1 Reply)
Discussion started by: aspect_p
1 Replies
9. Shell Programming and Scripting
Hi guys. Is it possible (I'm sure it is) to use the output of a simple 'ls' command as input of another command 'tail'.
It is not really the output of the 'ls'. I have to useeach line of the output.
This is the first command...
ls *myFile*021308*
Which it outputs many filenames. For each... (3 Replies)
Discussion started by: rodrimuino
3 Replies
10. Shell Programming and Scripting
This site has been very helpful thus far.. I thank you all in advance for sharing the knowledge. Let me get to it.
I am trying to write a very small script to take away from the boredom of doing the same thing over and over.
Everynow and again I have to get the hex value of a file using a... (2 Replies)
Discussion started by: BkontheShell718
2 Replies