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
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
4. Shell Programming and Scripting
I am having problems because some of my files have timestamps that are earlier that 1.1.1970, the Unix start of time convention.
So I would like to write a script that finds all files in home folder and subfolders with timestamps earlier than 1.1.1970 and converts them to 1.1.1980.
I... (3 Replies)
Discussion started by: francus
3 Replies
5. Shell Programming and Scripting
I need to be able to compare dates in the format of Jan 10, 2012 and Jan 10 2012. (Notice one has a comma).
Then I need to find the date that is 7 days before those dates if they are equal.
How can I do this in Bash.
Thank ahead (4 Replies)
Discussion started by: ojthejuice
4 Replies
6. Shell Programming and Scripting
Hi all, this is my first post so go gentle.
My goal is to use SED to add data to the end of lines in a file, then send the results to standard output. However, I want to add the result of another command to the end of the lines.
Basically:
sed 's/$/ insert command stuff here/' file.txtHere... (1 Reply)
Discussion started by: jsmith_4242
1 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. UNIX for Dummies Questions & Answers
Hello,
I have found a piece of code which converts seconds elapsed since 1970 for an input date. Can anyone please explain a little bit the code below:
#!/bin/bash
# function to reproduce UNIX time() value
second()
{
set -- $(TZ=GMT date '+%Y %m %d')
local y=$1 m=1$2 d=1$3
((m-=103,... (0 Replies)
Discussion started by: thana
0 Replies
9. IP Networking
Hi there!
I've used the ftp command to transfert datas between two linux box.
The answer of this command, was:
It strange because the transfert was complete and it brings two messages, the first is successful from PORT command and the second is an error from EPRT command!
So, It seems that... (1 Reply)
Discussion started by: nymus7
1 Replies
10. UNIX for Dummies Questions & Answers
How can I get the syatem to give me the days since 1970 (as seen in the shadow file)? (4 Replies)
Discussion started by: 98_1LE
4 Replies