10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Is there possible to do vlookup in Mysql one table from another table based on one column values and placed the data in same table?
if it is possible in mysql itself pls share links for reference.
Here is the ex: i need to vlookup the cus.id in table to and place the cus.name in 4th... (3 Replies)
Discussion started by: Shenbaga.d
3 Replies
2. Shell Programming and Scripting
Hi,
I was searching for a way to grep 2 lines before and after a certain keyword, and I came across the following code..
awk "\$0 ~ /ORA-/ {
cmd=\"awk 'NR>=\" NR-2 \" && NR<=\" NR+2 \"' init.ora\"
system(cmd)
}" input_file
I could not understand how this works. What is system() ? what... (2 Replies)
Discussion started by: Kulasekar
2 Replies
3. Shell Programming and Scripting
when i try the snippet in the console its working fine:
ps awwwux | grep php-fpm | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
output:
but when i try the bash script:
#!/bin/sh
# -*- sh -*-
#... (3 Replies)
Discussion started by: danieloooo
3 Replies
4. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
5. Shell Programming and Scripting
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies
6. Shell Programming and Scripting
Hi everybody,
I am working on a bigger awk script in which one part is comparing the size of two files.
I want to evaluate which file is bigger and then just save the bigger one.
I got it all working except for the part where I want to figure out which file is bigger; the one awk is currently... (2 Replies)
Discussion started by: iMeal
2 Replies
7. Shell Programming and Scripting
Combining many lines to one using awk or any unix cmd
Inputfile:
Output :
Appreciate help on this. (14 Replies)
Discussion started by: pinnacle
14 Replies
8. HP-UX
I was wondering if it was possible to tell awk to print the output of a command in the print.
.... | awk '{print $0}'
I would like it to print the date right before $0, so something like (this doesn't work though)
.... | awk '{print date $0}' (4 Replies)
Discussion started by: IMTheNachoMan
4 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to read a file as input and pull out some information from the file and put it into another file in column format and then take that file and make it an excel file. My problem is that I'm trying to put the date in one of the columns using a variable in an awk cmd, but when I... (4 Replies)
Discussion started by: New2Scripting
4 Replies
10. UNIX for Dummies Questions & Answers
I've noticed most of my postings here are because of syntax errors.
So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies