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 all, I am trying to create a script to read my Windows UUIDs and create mounts in fstab. I know there are different and maybe even better ways to mount Windows partitions at boot time, but I always manually create them in fstab successfully. I do a clean install of Ubuntu often and would like to... (2 Replies)
Discussion started by: Ian Pride
2 Replies
4. Shell Programming and Scripting
Hi,
I'm having an issue trying to produce a hierarchical directory menu that has either any directories listed in a specific directory as options or options with spaces in the option content or null content.
So the menu function gets passed a base directory, it then lists any .sh scripts in... (6 Replies)
Discussion started by: andyatit
6 Replies
5. 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
6. 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
7. 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
8. Shell Programming and Scripting
Hi Gurus,
I am trying for a scenario where in I want to read the contents of a file line by line and then store them in variables. Below is the script:
#!/bin/ksh
while read line
do
id=`echo $line | cut -f1 -d |`
name=`echo $line | cut -f2 -d |`
echo $id
... (11 Replies)
Discussion started by: svajhala
11 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
Hi all,
I have searched and found various threads about removing spaces from a field within a text file. Unfortunately, I have not found exactly what I'm looking for, nor am I adept enough to modify what I've found into what I need.
I use the following command to remove the first line... (3 Replies)
Discussion started by: carriehoff
3 Replies