10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
!#bin/bash
clear
var= grep @gmail.com email.txt | wc -l
echo $var
echo $var
exit 0
OUTPUT:
1000
_
_
Where _ represent space (no value or nothing) (4 Replies)
Discussion started by: Muhammad Rehan
4 Replies
2. Shell Programming and Scripting
These seems ridiculously simple but I can't get it to work. Using korn shell and I want to pass in a flag to tell my echo statements to either write to the screen for debugging or a file if not. So I have something like:
if ; then
logout=&1
else
logout='logfile.out'
fi
Then... (2 Replies)
Discussion started by: DJR
2 Replies
3. UNIX for Advanced & Expert Users
Hi
I have a file called "test.txt" and it looks like this
x
y
z
x/c
y/c/b
now, i want to run a command and its output will be like this
x 10
y/c/b 20
z 78
--------
my requirement is, i want to add the command output to "test.txt" as like below
x 10
y ... (1 Reply)
Discussion started by: siva kumar
1 Replies
4. Shell Programming and Scripting
I need some help:
1) I have a out put from a shell script, the out put looks like this:
Attempting privilege escalation using sudo ...
List backups for CLTST:
Start date Status Ret. Class Label
-------------------- ------------ ------------ ... (2 Replies)
Discussion started by: samk
2 Replies
5. UNIX for Dummies Questions & Answers
I am calling fab file from shell, and i am getting the output from python. How to store that value in shell?
Eg:- I am taking the value using yaml file in python. Since i am calling python from shell, i need to store the value in variable or in array using shell, because my next call is running... (0 Replies)
Discussion started by: KarthikPS
0 Replies
6. Shell Programming and Scripting
Hi All, I am a newbie to unix.starting my career in unix.need 1 help from you all..pls help..
i am passing a file name "abc_delta" as argument to my script1.sh.
if file name contains "_delta" at last then echo pass else fail.how to fix it.
Note:file name will always contain "_delta" at... (10 Replies)
Discussion started by: pradeepcarya
10 Replies
7. Shell Programming and Scripting
Hi,
Output of "ps -o etime,time,pcpu,pmem,fname -C sbd-java"
command is -
Elapsed Time %cpu %MEM COMMAND
02:14:03 00:03:28 2.5 6.3 sbd-java
Can anyone tell me, how to store the the value 2.5 in a variable?
When I say echo $X where x is a variable then... (4 Replies)
Discussion started by: pspriyanka
4 Replies
8. Shell Programming and Scripting
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies
9. UNIX for Dummies Questions & Answers
Hi all..
I got a problem..
Its easy to redirect o/p to a file.. But Is it possible to redirect the O/P to a variable?
For example:
I've a command in my script:
string1=cut -d ':' -f2 file.txt
When I do:
echo $string1
The value is empty... Pls suggest me how to store the value... (7 Replies)
Discussion started by: smartbuddy
7 Replies
10. Shell Programming and Scripting
Hi,
I am getting the following error while executing the script. Please can someone throw some light where is the problem. Many thanks.
./check: temp: not found
The directory related to SEP instance 4 does not exist.
The script is as follows.
SEP_APP="/scp/sepx/app... (2 Replies)
Discussion started by: Sudhakar333
2 Replies