10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Guys,
I would like to ask you for a favor. Could you please help me how can I assign any number as the parameter to a, from stdin (-c), in the following command line by using the 'switch' in a script?
awk '$8>a {print "File name:" $5,$8}'
I would also appreciate if you can share any... (1 Reply)
Discussion started by: Padavan
1 Replies
2. Solaris
i am trying to assign the following expression to a variable in Unix shell script
and want to use that variable in some other expression. But unable to get the required thing done. Please help with this....
This is the expression which i want to provide as input the variable
date '+%y:%m:%d' |... (3 Replies)
Discussion started by: ssk250
3 Replies
3. Shell Programming and Scripting
Hi all,
I have to write script to make my usual job easy. Basically it involve reading a output of following pattern:
crab: ExitCodes Summary
>>>>>>>>> 45 Jobs with Wrapper Exit Code : 0
List of jobs:... (10 Replies)
Discussion started by: emily
10 Replies
4. Shell Programming and Scripting
Hi, I was wondering if anyone could assist me for (what is probably) a very straightforward answer.
I have input files containing something like
File 1
Apples
Apples
Apples
Apples
File 2
Bananas
Bananas
Bananas
Bananas (4 Replies)
Discussion started by: hubleo
4 Replies
5. UNIX for Advanced & Expert Users
echo "hello123" | tr -dc '' | wc -c
using this command i can count the no of times a number from 0-9 occurs in the string "hello123"
but how do i save this result inside a variable?
if i do
x= echo "hello123" | tr -dc '' | wc -c
that does not work...plz suggest..thanks (3 Replies)
Discussion started by: arindamlive
3 Replies
6. Shell Programming and Scripting
I am trying to assign the value returned by wc command to a script variale.
Code:
FILES_NAME='files_list';
NO_OF_FILES =${wc -l $FILES_NAME}`;
When the above code is run : it throws the error
${wc -l $FILES_NAME}: The specified substitution is not valid for this command.
what is the... (6 Replies)
Discussion started by: hiten.r.chauhan
6 Replies
7. Shell Programming and Scripting
Hello everyone,
My problem looks quite simple , how to assign a string with spaces and lines "\n" to a variable.
I've tried all kind of quoting and is impossible, bash always try to execute the string and never executes a simple assignation.
This is part of the code
... (1 Reply)
Discussion started by: trutoman
1 Replies
8. Shell Programming and Scripting
I haven't checked any installation script to see how this is done..
But I could not even do following simple task.
How do I Change existing variable value only when user enteres non-empty string. ?
#!/usr/bin/ksh
uid="scott"
# Assign new value user enters to uid, else leave it... (7 Replies)
Discussion started by: kchinnam
7 Replies
9. Shell Programming and Scripting
Hi - Help needed.
I have an input file that looks something like this, but with a lot more entries:
A
Customer1
B
4500
C
8000
A
Customer2
B
6422
C
8922
I need to be able to print details for each customer on one line per customer.
ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies
10. Shell Programming and Scripting
Hi all,
I encountered a problem where my script stops running the remaining checks after becoming an admin that is written within the script.
For example:
=========================================
#!/bin/sh
check 1 # Runs successfully
check 2 # Runs successfully
/com/bin/admin #... (1 Reply)
Discussion started by: seanchew
1 Replies