10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose i have a perl script that is normally run this way:
./checkdisk.pl -H hostname -w 40 -c 80
but, for whatever reason, i cannot run the script directly as it should. But i can cat it through pipe. How can i pass the arguments "-H hostname -w 40 -c 80"?
so this is what i'm doing,... (6 Replies)
Discussion started by: SkySmart
6 Replies
2. Shell Programming and Scripting
I need to declare a function, this function will contain a script, this script cannot be in a file but must be piped. and then, for the script to run, i need to pass arguments to it.
everything has to be on one line. so i'm basically looking for a one-liner
here's what i'm doing:
myfunc ()... (3 Replies)
Discussion started by: SkySmart
3 Replies
3. Shell Programming and Scripting
I am trying to parse the input in awk to include the |gc= in $4 but am not able to. The below is close:
awk so far:
awk '{sub(/\|]+]++/, ""); print }' input.txt Input
chr1 955543 955763 AGRN-6|pr=2|gc=75 0 +
chr1 957571 957852 AGRN-7|pr=3|gc=61.2 0 +
chr1 970621 ... (7 Replies)
Discussion started by: cmccabe
7 Replies
4. Shell Programming and Scripting
am trying to pass the date calculated to variable so that i can use the same for my further reporting and tracking of the changes as per the variable value.
System = SunOS
Release = 5.9
KernelID = Generic_122300-61
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case... (5 Replies)
Discussion started by: pradeep84in
5 Replies
5. Shell Programming and Scripting
Hello All,
Thanks for taking time to read through the thread and for providing any possible solution.
I am trying to pivot a comma separated field in a pipe delimited file. Data looks something like this:
Field1|Field2
123|345,567,789
234|563,560
345|975,098,985,397,984
456|736
Desired... (8 Replies)
Discussion started by: svks1985
8 Replies
6. Shell Programming and Scripting
Hi,
I have a list of parameter in a file. I want to pass them one by one to piped command and syntax is like <command> <parameter> <command continues>
How to achieve that ?
Thanks (1 Reply)
Discussion started by: ezee
1 Replies
7. Shell Programming and Scripting
Hi,
I am trying to pass awk field to a command line executed within awk (need to convert a timestamp into formatted date).
All my attempts failed this far.
Here's an example.
It works fine with timestamp hard-codded into the command
echo "1381653229 something" |awk 'BEGIN{cmd="date -d... (4 Replies)
Discussion started by: tuxer
4 Replies
8. UNIX for Dummies Questions & Answers
i need to add a new field in a pipe delimited line. the field will be the current date today.
aa|a|s|w|1
as|oiy|oiy|oiy|2
given that all lines are uniformed in the number of fields
i want it to look like this:\
aa|a|s|w|1|20120126
as|oiy|oiy|oiy|2|20120126
please help :) (3 Replies)
Discussion started by: kokoro
3 Replies
9. Shell Programming and Scripting
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to replace a field in a text delimited file with the actual number of records in the same file.
HDR|ABCD|10-13-2008 to 10-19-2008.txt|10-19-2008|XYZ
DTL|0|5464-1|0|02-02-2008|02-03-2008||||F|||||||||
DTL|1|5464-1|1|02-02-2008|02-03-2008|1||JJJ... (3 Replies)
Discussion started by: ravi0435
3 Replies