10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please help me to use echo or printf type of command to print some value from variable within double quotes - I want to print the double quote ( " ") also.
I tried
#!/bin/bash
VALUE=some_value
echo '{"value" : "$VALUE"}'
I was expecting the above script would produce ..
{"value" :... (3 Replies)
Discussion started by: atanubanerji
3 Replies
2. Shell Programming and Scripting
Hi All,
I 'm matching two files based on the first 2 columns and then populate other fields along with subtraction of few fields.
I have managed to get the output. However, is there a easier way in formatting the output as shown below instead of using additional printf for getting fixed width... (4 Replies)
Discussion started by: shash
4 Replies
3. Shell Programming and Scripting
Hi all,
i am trying to count the number of logical processors from the below output:
# print_manifest | grep "logical processors"
8 cores, 16 logical processors per socket
2 logical processors (2 per socket)
i just want to have below output :
16
2
also... (11 Replies)
Discussion started by: omkar.jadhav
11 Replies
4. Shell Programming and Scripting
Dear all,
I have two files like this
file1
A B
C D
E F
file2
1,2
3,4
5,6
I want this output
output_expected
A B 1,2
C D 3,4
E F 5,6 (3 Replies)
Discussion started by: valente
3 Replies
5. Shell Programming and Scripting
I have email headers that look like the following. In the end I would like to accomplish sending each email address to its own variable, such as:
user1@domain.com='user1@domain.com'
user2@domain.com='user2@domain.com'
user3@domain.com='user3@domain.com'
etc...
I know the sed to get rid of... (11 Replies)
Discussion started by: tay9000
11 Replies
6. Shell Programming and Scripting
Hello all.
I can not remember the command to extract a variable from the date command.
Basically what I need to do is to store the values of date in variable and rearrange them. I can not remember the command or the syntax to do so.
so..
date
Mon Mar 8 06:57:19 GMT 2010
$1 $2 ... (12 Replies)
Discussion started by: adelsin
12 Replies
7. Shell Programming and Scripting
I've been trying to get the syntax right so I can echo a $var and then text around it or after it. It either wont display text or $var or one overwrites the other at the beginning of the line. Trying to do something like this.
var=1
echo $var"+1.1"
#output expected 1+1.1
Its an older... (3 Replies)
Discussion started by: Grizzly
3 Replies
8. UNIX for Dummies Questions & Answers
Hi Experts,
Need help on printing of numbers, which are missing in the range.
Pls find the details below
Input
1000000002
1000000007
1234007940
1234007946
Output
1000000003
1000000004
1000000005
1000000006
1234007941 (2 Replies)
Discussion started by: krao
2 Replies
9. Shell Programming and Scripting
Hi experts
I want the proper argument to the grep command so that I need to skip the first few lines(say first 10 lines) and print all the remaining instances of the grep output.
I tried to use grep -m 10 "search text" file*. But this gives the first 10 instances(lines) of the search string.... (7 Replies)
Discussion started by: ks_reddy
7 Replies
10. UNIX for Dummies Questions & Answers
Hi Experts,
I want to print the lines whose third field in non-empty/blank space.
i.e.
INPUT FILE/B]
dcdccghjrry0yd cont
dcdccttrk820529 cont rdekedfsSCr
dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies