Topic RSS
10:24 am
How to make bash script or file.sh to capture parameter? I try using $1 in script but it doesnt capture parameter
file.sh
#! /bin/bash
echo $1 >> text.txt
run file from FittaQuilla
/home/file.sh,@SUBJECT@
Try to test it, and I see from
- the filter log that the filter run
- no error from error console
but the text.txt is still empty, the permission is 777, try to run it from shell with
./file.sh helllo
and the test.txt have "hello" word in it.
Please help and thank you.
I am only an occasional Linux user, and that for server work, so I don't run Thunderbird on Linux very often. But let me make a suggestion here.
I suspect what is happening is that /home/file.sh as a script is not really a system level process, which is what RUN starts, but is interpreted that way by other software (like by bash itself). So I think that what you need to do is to actually run bash from the FiltaQuilla RUN command, and figure out how to pass parameters to it to then get it to do what you want it to do. There must be a way to start bash where the @SUBJECT@ that will appear as a parameter will then get interpreted that way by the script.
Most Users Ever Online: 18
Currently Online:
9 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Member Stats:
Guest Posters: 130
Members: 565
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 7
Topics: 231
Posts: 802
Newest Members: Matteo, p.dobrogost, gaute, Mythobeast, terry, Livraria Notre Dame
Moderators: rkent (323)
Administrators: rkent (323)
Log In
Register
Members
Home
Add Reply
Add Topic
Quote
Offline

Recent Comments