Search Results

Search: Posts Made By: TECK
1,731
Posted By TECK
Replace string in line below specific pattern?
Hi,

I'm trying to replace a string with sed, in a text file containing this pattern:
location alpha
value x
location beta
value y
location gamma
value y
location delta
...
1,825
Posted By TECK
[solved] sed append into .bashrc
Hi all,

I'm trying to do a basic append into /home/joe/.bashrc:
/usr/bin/test -z `sudo /bin/grep umask /home/joe/.bashrc` && sudo /bin/sed -i '/PATH=/a \
umask 0022
' /home/joe/.bashrc
I run...
14,923
Posted By TECK
Preserving the timestamp while running gzip?
Hi guys,

I'm trying to unzip a file and rename it to another while preserving the original timestamp:
$ cat file.dat.gz | gzip -d > newfile.dat

My goal is to assign the file.dat.gz timestamp...
1,793
Posted By TECK
Thanks Corona. Unfortunately, CentOS does not use...
Thanks Corona. Unfortunately, CentOS does not use start-stop-daemon in their init scripts.
But the nohup did the trick nice. :)
1,793
Posted By TECK
Thanks for your reply. Can I use /dev/null...
Thanks for your reply. Can I use /dev/null instead?

# /usr/bin/script >/dev/null 2>&1
1,793
Posted By TECK
Freeing the terminal from busy shell script?
Hi guys,

I wrote a basic inotifywait shell script on my CentOS 5.6 x86_64 test server that syncs any deleted files in a directory.

/usr/bin/script
#!/bin/sh
inotifywait -m -e delete...
Forum: Linux 01-24-2011
8,806
Posted By TECK
But you will still be stuck to fix the issues, at...
But you will still be stuck to fix the issues, at midnight... when your boss is sleeping like a baby. :)
Forum: Linux 01-24-2011
8,806
Posted By TECK
Once the electricity issues are dealt with, what...
Once the electricity issues are dealt with, what would you do next? Presuming that you reboot several boxes and they simply refuse to start properly the services, deadlocks etc. I'm trying to also...
Forum: Linux 01-24-2011
8,806
Posted By TECK
Administrator responsibilities, in case of power outage?
Hi guys,

I was wondering if you could share some of your knowledge, in the event of a power outage.
Let presume you are on duty and you get a call at midnight because half of your cabinets have...
3,050
Posted By TECK
Select a specific part of the string and print it
Hi all,

I have a string that looks like:
#!/bin/sh

options="arguments: --user=alpha --group=beta --prefix=/usr/share --proxy-path=/proxy --proxy-tmp=/tmp --conf-path=/etc"

My goal is to...
1,879
Posted By TECK
Yes, I did. It does not return anything. I did...
Yes, I did. It does not return anything.
I did fixed the issue, thanks.
1,879
Posted By TECK
I need to define variables with awk: $index,...
I need to define variables with awk: $index, $records, $size
See my non-working code prototype, used as example:

indexlist=$(
$indexer --config $CONF_PATH --run $1 |
awk '/^testing...
1,879
Posted By TECK
Hi Chris, No, it does not. The index names...
Hi Chris,

No, it does not. The index names are just an example, they could be anything:
index[0]="testalpha"
index[1]="johndoe"
index[2]="dancedance"

Just to clarify better what I try to...
1,879
Posted By TECK
Pull specific data from repetitive text?
Hi all,

I have a bit of a problem with a loop that extracts repetitive text.

Running /bin/index executable outputs this text to terminal:
testing index 'scanthread'...
collected 0 docs, 0.0...
4,707
Posted By TECK
Just a friendly reminder that I did not solved...
Just a friendly reminder that I did not solved yet my issue and still looking for help.
Running $indexer will output this text:
indexing index 'delta'...
ERROR: this is an error message.
WARNING:...
4,707
Posted By TECK
Chris, do you recommend me to use the same...
Chris, do you recommend me to use the same approach? (looking at your quoted code)
I think my question was not clear, sorry about that.
Basically, I need to search into this string with awk for...
4,707
Posted By TECK
Related to the same shell output: indexing...
Related to the same shell output:
indexing index 'delta'...
ERROR, (error message here)...
WARNING, (warning message here)...
collected 1953887 docs, 821.3 MB
sorted 129.7 Mhits, 100.0% done...
4,707
Posted By TECK
Thanks a lot, works perfectly!
Thanks a lot, works perfectly!
4,707
Posted By TECK
Thanks a lot guys! This is what I have so far: ...
Thanks a lot guys!
This is what I have so far:
result=$($indexer delta | awk '/^total.*docs/ {printf "docs=%d size=%d", $2, $4; exit}')
eval $result
echo $docs

Output:
1953887

Is there a...
4,707
Posted By TECK
Extracting data from a shell output?
Hi all,

I use a sh script to run few commands on CentOS 5.2. My goal is to search into test output for specific content and save it into a database table. So far everything is simple, except that...
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 06:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy