10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I am attempting to assign the output of the following command, to two bash variables, var1 and var2 using "read," but it doesn't seem to be working.
# openstack hypervisor stats show | awk -F'|' 'NR==14{print $2,$3}'
vcpus 92
# echo $?
0
# openstack hypervisor... (4 Replies)
Discussion started by: sand1234
4 Replies
2. Shell Programming and Scripting
i try to find way to make string concatenation in csh ( sorry this is what i have )
so i found out i can't do :
set string_buff = ""
foreach line("`cat $source_dir/$f`")
$string_buff = string_buff $line
end
how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies
3. Windows & DOS: Issues & Discussions
Hi all,
Our users use Putty on Windows servers to log on to UNIX via SSH and run GUI applications. Is there a way to automatically get the display numbers from xming or Exceed (that are running on Windows) to set the DISPLAY var properly on UNIX? X11 forwarding is not an option.
The closest I... (3 Replies)
Discussion started by: ejianu
3 Replies
4. Programming
Hi all,
I am just wondering is this (below code) valid in programming
int xx = 10110;
int i;
long yy = {1,2,3,4,5,6,7,8,xx};
I compiled this using gcc will all working option successfully without getting any warning or error. I didn't see this kind of code in my past... (7 Replies)
Discussion started by: zing_foru
7 Replies
5. UNIX for Advanced & Expert Users
topic moved to programming (0 Replies)
Discussion started by: zing_foru
0 Replies
6. Shell Programming and Scripting
Hi,
does anybody knows how to manage, that the filenames are assigned to a variable in a loop afer getting them with set command in a ksh, like:
set B*.txt
i=1
c=$#
x=$((c+1))
echo "$x"
while ] ; do
_ftpfile$i="$"$i
echo "$_ftpfile$i"
i=$((i+1))
done
The first echo returns,... (2 Replies)
Discussion started by: spidermike
2 Replies
7. Shell Programming and Scripting
Running: GNU/Linux, 2.6.22.9-61.fc6 (hope that's the right info needed)
I am trying give the amount of RAM and the % used. I am using free command.
I am having some problems with this command
code:
1)T = `free | grep Mem | awk '{print $2}'`
F = `free | grep Mem | awk '{print $4}'`... (3 Replies)
Discussion started by: AngelFlesh
3 Replies
8. Shell Programming and Scripting
how do I feed output of "wc" to a shell script variable "countBcp"? (2 Replies)
Discussion started by: devy
2 Replies
9. Shell Programming and Scripting
Hi pros,
Could anyone tell me the actual difference between setting the positional parameters from the variable using the following commands?
$ var="This is my question"
$ set $var
$ echo $1 --> 'This'
$ echo $2 --> 'is'
....
....
and
$ var="This is my question"
$ set --... (3 Replies)
Discussion started by: royalibrahim
3 Replies
10. Shell Programming and Scripting
Hi :)
The next script campares two files File1-Line1 vs File2-Line1, File1-Line1 vs File2-Line2... only if line contains "AS-", if LineX is not in File2 writes in aux, but "valor" is allways=1 never changes! :confused: What is wrong?
valor changes to 0 before break, after brake is again 1
... (3 Replies)
Discussion started by: agustincm
3 Replies