9 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
Hello,
I have a simple task and I am having some trouble with the syntax. I have a variable with an assigned value,
CMD_STRING='-L 22 -s 0 -r -O -A i -N 100 -n'
I would like to add that variable to an array. As far as I have been able to look up, the syntax should be something like,
... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
3. UNIX for Dummies Questions & Answers
This might be a weird question, that's not possible, but just wondering:
If I have a file for example that has the content:
awk '{print "head - "$1" > reduce_lines_"$1}' all
And another file that has the content:
221
Is there a way to put the 221 in the space (after head -) of... (27 Replies)
Discussion started by: cosmologist
27 Replies
4. OS X (Apple)
Hey everyone,
I have come across an issue to where I am trying to create a script which changes the text color with a simple if then statement. I have seen it done with Fedora 8 but when I try and create it using my MacBook Pro running Snow Leopard it doesn't work. Funny thing is, when I use... (2 Replies)
Discussion started by: dachadster13
2 Replies
5. Shell Programming and Scripting
Hello everyone, I'm trying the best way to implement a check on a variable ... in particular I need to assess the content of characters and numbers , I tried on various manuals bash scripting but I could not figure out how to do ... any help? (3 Replies)
Discussion started by: ionral
3 Replies
6. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
7. Shell Programming and Scripting
I have a variable that contains filenames like this:
variable="file_1.extension<blank>file_2.extension<blank>file_3.extension<blank>file_4.extension and so on"
How can I make filenames to be separated by newline: (I tried Sed but it didn't worked well)
file_1.extension
file_2.extension... (6 Replies)
Discussion started by: MartyIX
6 Replies
8. Shell Programming and Scripting
I got a sample BASH script like this :
$ cat test
MYVAR=$1
DUMMY1="This is tricky"
DUMMY2=24
echo $
$ ./test DUMMY1
./test: line 5: This is tricky: syntax error in expression (error token is "is tricky")
**I was expecting the output as "This is tricky", ah! but no luck
**But... (2 Replies)
Discussion started by: jaduks
2 Replies
9. Shell Programming and Scripting
Dear Experts,
Please help to teach me how to add the filename into the file content.
Actually the file name are EVENTS-20050912.
***************New output that I want***************
EVENTS-20050912 03:33:37 ALARM: BTSSPAN-277-1 30-18013
EVENTS-20050912 12:10:28 ALARM: BTSSPAN-297-2... (1 Reply)
Discussion started by: missutoomuch
1 Replies