Need help piping a value to a variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help piping a value to a variable
# 1  
Old 11-13-2014
Need help piping a value to a variable

Hey Guys. Below is the code I am using to pipe a value into a variable. When I tried it says the following

xargs: :HEX:: No such file or directory

Not sure what it means. Can anyone please help me figure this out.

Below is the code I am using. (It echo's out just fine)

sed -n 73p style.css | cut -c 30-36 | xargs :HEX: color=:HEX:
# 2  
Old 11-13-2014
Moderator's Comments:
Mod Comment xargs did not work that way in the last thread you created about this, and continues to not work that way now.

If you answer the question I left in your original thread we will be able to understand what you want..


Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Piping Unix Variable Array values into AWK

#ksh Here is my code: ERRORLIST="43032 12001 12002 12003 12004 34019 49015 49016 49017 49018 49024 49025 49026 58004 72003 12005 12006 12007 12008 12011 12012 16024 16023" for ERROR in ${ERRORLIST} do awk -v l="$lastdate" '/^....-..-../&&$0>l{d=$0}d&&/Error: '"${ERROR}"'/{print... (3 Replies)
Discussion started by: k1ko
3 Replies

2. Shell Programming and Scripting

piping ls to zenity and returning selection to variable

Hi I'm fairly new to unix and scripting (in BASH) and am here to post my first question. What I'm trying to do is pipe a sorted listing (ls) to zenity and when the list appears to the user, the choice they choose is returned to a variable so it can be used in conditional statements. I can... (2 Replies)
Discussion started by: Vayshan
2 Replies

3. Shell Programming and Scripting

Piping and assigning output to a variable in Perl

Hi All, I am trying to convert the below Csh code into Perl. But i have the following error. Can any expert help ? Error: ls: *tac: No such file or directory Csh set $ST_file = `ls -rt *$testid*st*|tail -1`; Perl my $ST_file = `ls -rt *$testid*st*|tail -1`; (10 Replies)
Discussion started by: Raynon
10 Replies

4. Shell Programming and Scripting

piping output from PHP file into variable

Hi. I have a script like so: #!/bin/bash download='php /var/www/last.php' echo $download if $downloadHow do I pipe the output of the php file into a variable, as when i run the if statement, it just echos the file output to the screen and does not actually consider the output (it will be... (2 Replies)
Discussion started by: daydreamer
2 Replies

5. Shell Programming and Scripting

Piping to a file and setting filename using a variable

Hi all, I would like to send the output of a line in a ksh script to a file, but I need to name the file using a predefined variable: ls -l > $MYVAR.arc But what is the correct syntax for achieving this? I can't seem to find the correct syntax for giving the file an extension. Any... (8 Replies)
Discussion started by: mandriver
8 Replies

6. Shell Programming and Scripting

Piping in Perl

Hi All, I am trying to perform the below csh code in Perl, but i am unfamiliar with Perl. Can anybody give me some advice on it ? Csh Code: cat filename |grep AAA| grep BBB| awk '{print("already_appended")' (11 Replies)
Discussion started by: Raynon
11 Replies

7. Programming

Piping Question

I have a piping question, I am trying to implement piping on my own shell and am having some trouble...esentially I am trying to make something to do command|command|command. I can get it to work fine if the last pipe command is not forked, but executes in the shell and then exits..but I need it... (2 Replies)
Discussion started by: mtobin1987
2 Replies

8. Programming

Help with piping program

Hi, I am trying to write a program that will pipe any number of programs together like in the linux shell. As an example, the below code tries to execute "cat data | grep int | cut -b 1-10." The problem is that the programs never get executed for some reason. It seems like the first program... (3 Replies)
Discussion started by: PuppyHusher
3 Replies

9. Shell Programming and Scripting

piping

I am using pipes (specifically piping out) in Perl to put an array from one file into an array in a different file. I can't figure out how to transfer the array. I kow how to open the pipe : open (FILEHANDLE, "| file") or die~ but how do I transfer the array. I think it has something to do with... (1 Reply)
Discussion started by: lnatz
1 Replies

10. Shell Programming and Scripting

Help (Piping ls, tr, cut)

I have to: pipe ls, tr, and cut to output the size (in bytes) and name of all of the files/dirs in the current directory (including any hidden ones), with the size at the beginning of the line, followed by a single tab character, followed by the the filename. I don't know what the point of... (2 Replies)
Discussion started by: scan
2 Replies
Login or Register to Ask a Question