10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
2. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
3. Shell Programming and Scripting
Dear all,
For example, if data contains following numbers:1 2 3 4 5 6
I would like get like below using foreach command,1 2
1 3
1 4
1 5
1 6
2 3
2 4
2 5
2 6
3 4
3 5
3 6
4 5 (1 Reply)
Discussion started by: Ryan Kim
1 Replies
4. Shell Programming and Scripting
Hi,
I am running following command in a bash script for testing IO and use grep to get throughput number, but it did not work, it displayed everything:
dd if=/dev/zero of=/dev/null bs=1G count=1 oflag=dsync | grep bytes | awk '{print $7}'
1+0 records in
1+0 records out
536870912 bytes... (2 Replies)
Discussion started by: hce
2 Replies
5. Shell Programming and Scripting
This is my command
echo "Test" | sed -f <(sed -e 's/.*/s,&,gI/' mydic)
In mydic file,containing 2 columns delimit by comma (,)
a,AlphabetA
.
.
.
e,AlphabetE
.
.
s,AlphabetS
.
t,AlphabetT
test,testedd
.
.
zebra,zebraaaa
The expect result is testedd (0 Replies)
Discussion started by: Runicer
0 Replies
6. Shell Programming and Scripting
Hi All,
How can i take the following code having three seds into a variable :
echo "$DateFileFormat" | sed 's/\./\\\\./g' | sed 's/\$/+/g' | sed 's/\#/'$job_date'/g'
I want to get the result stored in a script variable
i tried
var2=`echo "$DateFileFormat" | sed 's/\./\\\\./g' |... (4 Replies)
Discussion started by: abhinav192
4 Replies
7. UNIX for Dummies Questions & Answers
The following pseudo-code should be clear to what I am trying to achieve:
if ; then
kldload linux
echo 'linux_enable="YES"' >> /etc/rc.conf
fi
What is the proper syntax or operator for the test?
Thanks in advance (5 Replies)
Discussion started by: figaro
5 Replies
8. Shell Programming and Scripting
I am in the process of writing a script to change the grub password in the grub.conf file. I thought I had it figured out, but am running into an a problem I can't put my finger on.
Command I am running when I find that the grub.conf file contains "password --md5".
sed... (1 Reply)
Discussion started by: viRaven
1 Replies
9. Shell Programming and Scripting
Hi,
I'm quite new to scripting and I want to modify following line of an existing script:
MYVAR=`subst |grep 'L:\\\:' | sed -e 's/.*\\\//'`;
What I have to do is to use the content of a variable instead of the constant expression 'L:\\\:' as the grep string to be matched.
Assuming I already... (5 Replies)
Discussion started by: snowbiker99
5 Replies
10. UNIX for Dummies Questions & Answers
hello
how can i print to screen the result of this command ?
echo "pwd | sed 's/.*foo//'"
when i type it im geting it printed as string "pwd | sed 's/.*DevEnv//'"
and not the result of the operetion.
tnx (2 Replies)
Discussion started by: umen
2 Replies