Passing resulted string name of a gzipped file as an argument to another piped tool
Hi,
I have a .pcap.gz file and I would like to initially gzip it and then pass the resulting .pcap filename as an argument to a piped tool; the right-hand tool is not standardized linux tool but a custom one that strictly requires the string name of a given .pcap file in order for the pcap file to be processed. Anyhow,
For example, the tool works fine if i state the following on an already unzipped file :
I've tried the following just to check on whether it would work directly on a gzipped (however as anticipated it didn't):
Therefore, I was wondering on whether there is a way to use stdin or something else to do that?
this is the only way i can think of to do this but there must be a better way or else im gonna end up writing 200 lines of copy and pasting code.
echo ' READ WRITE EXECUTE'
own=$(ls -al $1 |cut -c2)
if ($own==r) then
first=yes
else
first=no
endif
echo $first
Im writing a... (1 Reply)
Hi All,
i have script like below..
echo "1) first option"
echo ""
echo "2) second option"
echo ""
echo "*) please enter the correct option"
read select
case $select in
1) echo "first option selected"
;;
2) echo "second option selected"
;;
*) echo "please enter the correct... (4 Replies)
Hi
Howto view gzipped files with name file.gz.$DATE on a Solaris box (without unzipping first)
$ ls -lrt
total 4477
-rwxrwxr-x 1 oracle dba 569745 Apr 4 19:45 4_person2profileCon.txt.gz.04.04.11*
-rwxrwxr-x 1 oracle dba 3783 Apr 4 19:45... (4 Replies)
For example
test.sh:
test="teststring"
cmd=$1
$cmd
For some reason I'm NOT seeing "teststring" when I type: ./test.sh "echo $test"
Any ideas on how to get around this?
I've tried commands like:
./test.sh "echo $($test)"
./test.sh "echo '$test'"
And many variations to no... (6 Replies)
Hi
Need help for the following scenario.
I am having two directories /tmp/a and /tmp/b. /tmp/a again has subdirectories /tmp/a/aa and /tmp/a/ab.
I want to run a script from /tmp/b to search for a file user.lst in the folders /tmp/a/aa and /tmp/a/ab, if available, i want to make a file in... (3 Replies)
How to pass the alphabet character as a argument in case and in if block?
ex:
c=$1
if a-z ]]
then
echo "alphabet"
case $1 in
a-z) echo "the value is a alphabet"
edit by bakunin: please use CODE-tags. We REALLY mean it. (9 Replies)
Hi.
I'm trying to do a "simple" thing.
grep -rls grepped_exp path | xgs
where xgs is an alias to something like:
xargs gvim -o -c ":g/grepped_exp"
now the problem is that I want to pass the "grepped_exp" to the piped alias.
I was able to do something like what I want without the... (4 Replies)
Hi All,
I am having command to run which will take argument as input file. Right now we are creating the input file by cat and executing the command
ftptransfer -i input file
cat >input file
file1
file2
cntrl +d
Is there a way I can do that in a single command like
... (1 Reply)
Hi all,
I have a a file which contains an oracle query. If this file is pushed into a shell script such as the below, it of course works fine.
#!/usr/bin/sh
su - oracle -c 'sqlplus -s / as sysdba <<EOF
@/home/cron/ORA/sql/T-ORA006-OracleSessions.sql
exit;
EOF
.
What i am after... (2 Replies)
I am trying to pass a second argument like so:
if ] then
export ARG2=$2
else
message "Second argument not specified: USAGE - $PROGRAM_NAME ARG1 ARG2"
checkerror -e 2 -m "Please specify if it is a history or weekly (H or W) extract in the 2nd argument"
fi
however, it always goes... (4 Replies)
Discussion started by: MIA651
4 Replies
LEARN ABOUT LINUX
toolbar
toolbar(3erl) Erlang Module Definition toolbar(3erl)NAME
toolbar - GUI for Starting Tools and User Contributions
DESCRIPTION
Toolbar makes it easier to use the different Erlang tools - and the user contributions - which are provided. It has a graphical user inter-
face with an icon for each tool. Clicking the icon activates the corresponding tool.
All tools to be included on Toolbar must have a configuration file containing information about the tool, for example its start function
and help information location. Configuration files must have the .tool suffix.
When started, Toolbar automatically checks for *.tool files in the current path and adds the corresponding tools. For each ebin directory
found in the path, it will also look in a priv directory next to it. This is a feature of the Erlang file structure.
EXPORTS
start() -> ok | already_started
Creates a window containing tool icons.
version() -> string()
Returns the current version number of Toolbar.
update() -> ok | {error,not_started}
Makes a search for new tool files in the current path and adds the corresponding tools to Toolbar window.
quit() -> ok | {error,not_started}
create_tool_file() -> ok | {error,not_started}
Starts the GUI used for creating and editing tool files.
add_gs_contribs() -> ok | {error,not_started}
Adds the path to the directory where the GS contributions are situated and add the tools found there, if any.
Ericsson AB toolbar 1.4.1 toolbar(3erl)