I think cabrao meant that you didn't need the *. Besides, with your grep in single quotes the shell would not expand it in any way so it would look for filenames literally including v00*
At the very least in a regular expression you would need .* (without single quotes)
A * in a regular expression matches 0 or more of the last expression (in your case the character 0), whereas . means match any character and .* matches 0 or more of any character.
You should also change your ls to "ls -1".
I don't know the names of the files in your $program directory, but:
should also do the same thing.
Don't confuse the * in how the shell expands filenames with * in a regular expression - they're not the same thing.
Anybody know what's wrong with this syntax?
awk -v job="$job" 'BEGIN { FS="|"}
{print $1,$2," ",$4," ",$3\n,$5,"\n"}' list
It's keeping give me this message:
awk: syntax error near line 1
awk: bailing out near line 1
It seems awk has problem with my BEGIN command.
Any... (8 Replies)
Does anybody know how to print a variable passed to awk command?
awk -F"|" 'BEGIN {print $job,"\n","Question \n"} {print $1,$2$4," ",$3}' "job=$job1" file1
I am trying to pass job the variable job1.
the output is blank.
?? (3 Replies)
Hi,
I have a unix script which can accept n number of parameters .
I can get the parameter count using the following command and assign it to a variable
file_count=$#
Is there a similar command through which i can assign a variable all the values that i have passed as a parameter
... (2 Replies)
Hi,
I am facing a challenge in fixing an issue in my installation scripts.Here is a situation:
There are 3 files which are invoked at a below given order:
Installer.ksh----->Installer.xml(Ant script)------->common.ksh
I am outputting a message from common.ksh at a terminal, after that trying to... (3 Replies)
Hi everybody,
Currently, I have a script which access a remote computer via SSH, go to a folder already defined in the code and then executes a program in it, just like that:
ssh user@host << EOI
cd path
./file
EOI
It executes fine, but now I want to pass an argument in the command... (2 Replies)
I am having difficulties with the fllowing script:
!/bin/sh
voicemaildir=/var/spool/asterisk/voicemail/$1/$2/INBOX/
echo `date` ':' $voicemaildir >> /var/log/voicemail-notify.log
for audiofile in `ls $voicemaildir/*.wav`; do
transcriptfile=${audiofile/wav/transcript}
... (4 Replies)
I have a script.
#!/bin/sh
cur_$1_modify_time=Hello
echo "cur_$1_modify_time"
When I run like
sh /root/script1 jj
I expect value "Hello" being assigned to variable "cur_jj_modify_time" and output being "Hello" ie echoing $cur_jj_modify_time
But the output comes as
# sh... (3 Replies)
Hello,
I am writing a script which is not giving the desired result. When I check the content of the 'InputFile_009_0.sh', it shows following with missing Index in this command
sed -i "s/L1ITMBLT.root/L1ITMBLT_"".root/g" run_DttfFromCombinedPrimitives_cfg.py
of .
Any help?
... (13 Replies)
In the bash below the variable date displays in the echo. However when I use it in the for loop it does not. Basically, the user inputs a date then that date is converted to the desired format of (month-day-year, no leading 0). That input is used in the for loop to return every file that matches... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT PHP
set_color
set_color(1) fish set_color(1)NAME
set_color - set_color - set the terminal color
set_color - set the terminal color
Synopsis
set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR]
Description
Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple,
cyan, white and normal.
o -b, --background Set the background color
o -c, --print-colors Prints a list of all valid color names
o -h, --help Display help message and exit
o -o, --bold Set bold or extra bright mode
o -u, --underline Set underlined mode
o -v, --version Display version and exit
Calling set_color normal will set the terminal color to whatever is the default color of the terminal.
Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey
font color, while set_color --bold white will result in a white font color.
Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator.
set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and
incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of
ncurses and recompile fish against it in order to fix this issue.
Version 1.23.1 Sun Jan 8 2012 set_color(1)