10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to send the content of a bash variable as a python argument for processing. The problem is that bash doesn't "expand" the content, just sends the expression.
script.sh#!/bin/bash
export RECEIVEDDATE=$(date +"%Y%m%d.%H%M%S")
perl checkdate.py
checkdate.pyimport datetime
import os... (3 Replies)
Discussion started by: Tribe
3 Replies
2. Shell Programming and Scripting
I would like to write a shell script to do the following , would advise how to make it ? very thanks
1. Connect LDAP server ( Id : user , password : pass )
2. check the field "user_account_create_date" in the LDAP server , the format of data in this field in LDAP is ABC20130922 ( 22 Sep ,... (3 Replies)
Discussion started by: ust3
3 Replies
3. Shell Programming and Scripting
Hi All,
I m very new to unix...i jus want to chk the content of file.
ma requirement is
if file has a content then
display it
else
dont display or something
pls specify which loop shalli use either for or while?? (20 Replies)
Discussion started by: navsan
20 Replies
4. Shell Programming and Scripting
is this possible?
its kind of like incrementing the value of a number in a variable. but in this case, instead of the value of the variable being a number, it's just contents/strings/characters/alpha-numeric etc. NOT a number.
For instance:
VAR=Tommy
for all in $(blah blah)
do
... (2 Replies)
Discussion started by: SkySmart
2 Replies
5. Shell Programming and Scripting
hello,
i have a variable which should have following content :
var="value1"
or
var="value2"
or
var="value2:*" # example: value2:22
how can i check :
- if the content is ok (value1 / value2* )
- the two options of "value2"
when content is example "value2:22" , i want to split... (3 Replies)
Discussion started by: bora99
3 Replies
6. Shell Programming and Scripting
I need to know if is possible to use grep to check content of a local variable, for eg. i use read index and i want to check if the index i read is in correct form, how do i do that i tried with grep but i get errors all the time dont know how to make it work.. thanks! (3 Replies)
Discussion started by: Goroner
3 Replies
7. UNIX for Dummies Questions & Answers
hi guys, im learning so be gentle...
i'm wanting to write a script to read in a customer number.
in order that the code is robust i want to check
1) the length of the value entered (4 characters)
2) that all characters entered are numeric between the values 1 to 3
3) that a value is... (1 Reply)
Discussion started by: skinnygav
1 Replies
8. Shell Programming and Scripting
Hi ,
I have a file called "X" . the content of X are
X
--
abc
def
and i have a file called "Y" , the content of Y are
Y
--
erty
sdss
s
abc
sfs
def
I need to check if the content of file X is contained in Y.Only unix (7 Replies)
Discussion started by: giri_luck
7 Replies
9. Shell Programming and Scripting
I need to check if $1 or $2 are empty before continuing but I don't know if bash has any logic of the sort. This is what I'm looking for - except that "and" doesn't seem to work.
if and ;then
...
Thank you! :D (4 Replies)
Discussion started by: ph0enix
4 Replies
10. Shell Programming and Scripting
Hello guys.
In my script, i have the following code:
echo "The tarfile contains these directorys"
tar -tf file.tar > tarlist.txt
cat tarlist | awk -F/ '{print $1 "/" $2}' | nl
echo "Enter path of the directory you want to extract or just press enter to extract everything: "
read path... (1 Reply)
Discussion started by: noratx
1 Replies