10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
so i have scripts that are piped and then run through one of the following mechanisms:
cat myscript.sh | sh
cat myscript.pl | perl
what i want to do is, after either of the above commands are run, if the output from the command contains a certain string, i want it to avoid printing... (3 Replies)
Discussion started by: SkySmart
3 Replies
2. Shell Programming and Scripting
My current line command is as follows:
echo -n "text: " ; grep "blah text" ../dir1/filename | wc -l
The output to the screen is as needed, but how do I print to a text file? (9 Replies)
Discussion started by: ncwxpanther
9 Replies
3. Shell Programming and Scripting
Hi
I will appreciate it if you can help me out. I have a file that contains this data
System Load: 3244 card: 1903 CPU: 6% card: 1904 CPU: 6% card: 1905 CPU: 28% card: 1906 CPU: 28% card: 1907 CPU: 36% card: 1908 CPU: 37%
I need to manipulate and output this as
system_load:3244... (2 Replies)
Discussion started by: kaf3773
2 Replies
4. Shell Programming and Scripting
Hi all,
I have a script that creates folders depending on what variables i enter when calling the script. This all works as expected but what i want to do is add some additional data into another file so that other scripts are aware of this file.
I've found the following sed command which... (12 Replies)
Discussion started by: springs2
12 Replies
5. Shell Programming and Scripting
i suspect the issue is with the IFS part. I have a script that reads a file. the problem here is that, when i run the script, it outputs a bunch of numbers. i know what these numbers are, but i dont understand why they're being sent to the screen.
as you can see below, everything should be... (5 Replies)
Discussion started by: SkySmart
5 Replies
6. Red Hat
Hi all,
Hereby wish to have your advise for below:
Main concept is
I intend to get current directory of my script file.
This script file will be copied to /etc/init.d.
A string in this copy will be replaced with current directory value.
Below is original script file:
... (6 Replies)
Discussion started by: cielle
6 Replies
7. Shell Programming and Scripting
Hi everybody!
I am writing a script which accepts two arguments one of them being a message. All is working except for the message part. That is, to accept text as an argument.
I have trouble storing and echoing a line of text. It seems that writing a few words and store them in an... (6 Replies)
Discussion started by: bluetxxth
6 Replies
8. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
9. Solaris
I am running solaris 8 on a sparcs box. The system is connected to a lightwave console server. I have a script that hangs when sending output to '/dev/console'. Any ideas?
-V (2 Replies)
Discussion started by: vada010
2 Replies
10. Programming
I was wondering if someone could show me what I'd need to do in C programming language to output the current values of all of your environment variables and do so in such a way that it will duplicate an "env" command on unix. Does anyone know how and can you share it with me?
Thanks in advance. (2 Replies)
Discussion started by: HelpMeIAmLost
2 Replies