10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I was trying a shell script. I was unable to store file contents to a variable in the script. I have tried the below but unable to do it.
Input = `cat /path/op.diary`
Input = $(<op.diary)
I am using ksh shell. I want to store the 'op.diary' file contents to the variable 'Input'... (12 Replies)
Discussion started by: am24
12 Replies
2. UNIX for Dummies Questions & Answers
<tr><td bgcolor=#D7EBAD><b>Instructions :</b></td>
<td>`cat temp.txt`</td></tr>
Hi Experts,
I have an requirement of displaying file contents in HTML mail , for which am using the above approach, Where as the output is kind of not as expected.
If there are 5 lines in the file, in the... (4 Replies)
Discussion started by: scott_cog
4 Replies
3. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
4. Shell Programming and Scripting
Hello
i tried many times echo $variables into text file with no success
for example:
echo "#!/bin/sh
BBHTAG=RFOCLT_check # What we put in bb-hosts to trigger this test
COLUMN=RFOCLT # Name of the column, often same as tag in bb-hosts
$BBHOME/bin/bbhostgrep $BBHTAG | while read... (5 Replies)
Discussion started by: mogabr
5 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have to read the contents of each field of a file creating user accounts.
The file will be of format :
... (6 Replies)
Discussion started by: dude_me5
6 Replies
6. Shell Programming and Scripting
My file is in this format :
username : student information : default shell : student ID
Eg :
joeb:Joe Bennett:/bin/csh:1234
jerryd:Jerry Daniels:/bin/csh:2345
deaverm: Deaver Michelle:/bin/bash:4356
joseyg:Josey Guerra:/bin/bash:8767
michaelh:Michael Hall:/bin/ksh:1547
I have to... (1 Reply)
Discussion started by: dude_me5
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
New at this, but want to learn more.
I'm trying this as an Shell Command in MacOSX;
newdate='<TIME>'
echo $newdate >> /Users/ttadmin/Desktop/test.txt
And it don't work. But if I just use;
echo <TIME> >> /Users/ttadmin/Desktop/test.txt
(<TIME> is an variable that one program... (6 Replies)
Discussion started by: jackt
6 Replies
8. Shell Programming and Scripting
I suppose the easiest way to explain my problem is to show you some code and then show you what the code outputs:
--------------------------------------------------
#!/bin/bash
echo "This line has spaces" > "/tmp/This Filename Has Spaces.txt"
export Foo=$(cat "/tmp/This Filename Has... (4 Replies)
Discussion started by: nrogers64
4 Replies
9. Shell Programming and Scripting
There is a file named file.txt whose contents are:
+-----------------------------------+-----------+
| Variable_name | Value |
+-----------------------------------+-----------+
| Aborted_clients | 0 |
| Aborted_connects | 25683... (6 Replies)
Discussion started by: proactiveaditya
6 Replies
10. Shell Programming and Scripting
I'm trying to write a script that reads down a listcontaining various columns, if line1 column 1 != 0 then copy various field to variable field1, then check line1 column2 if > 0 this time copy to variable field2 ...
Once all columns checked I want to print the value of each variable if it exists... (2 Replies)
Discussion started by: gefa
2 Replies