10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I'm works on Ubuntu server
My goal : I would like to read file line per line, but i want to started at the end of file.
Currently, I use instructions :
while read line;
do
COMMAND
done < /var/log/apache2/access.log
But, the first line, i don't want this. The file is long... (5 Replies)
Discussion started by: Fuziion
5 Replies
2. Shell Programming and Scripting
Hi All,
Sorry for long topic here.
So the drill goes like that, I need a script which gathers different values from different files/locations.
A_CT=`cat a.dat | awk -F'|' '{print $1}' >> report.txt`
B_CT=`cat b.dat | awk -F'|' '{print $3}' >> report.txt`
C_CT=`cat c.dat | awk -F'|'... (4 Replies)
Discussion started by: shivakid
4 Replies
3. Shell Programming and Scripting
Hi all,
I have a little problem with a expect in a bash Script.
The hull of my script:
#!/bin/sh
( expect -c '
set a \"eee\"; # the variable a
' )
echo $a; # using the variable out of the expect script
I would like to use the variable out of the expect script(in bash),... (3 Replies)
Discussion started by: gandalfthepink
3 Replies
4. Shell Programming and Scripting
Hi
I am setting the variables like this :
setenv MODULE1 modem5__3
setenv MODULE2 modem5__2
setenv MODULE3 modem_ctrl_1_1
setenv MODULE4 modem_1_0
setenv COUNT 10
I am having a bash script as shown below
################################################
#!/bin/bash
for ((... (5 Replies)
Discussion started by: kshitij
5 Replies
5. Shell Programming and Scripting
Hello Folks,
I must be blind that I cant figure out this perl script why I end up with ;; at the end of the line.
I am not an expert by any means
#!/usr/bin/perl
use File::Find;
open F,shift or die $!;
my %ip=map/(\S+)\s+(\S+)/,<F>;
close F;
find sub{
if( -f ){
local... (4 Replies)
Discussion started by: richsark
4 Replies
6. Shell Programming and Scripting
There is a same named log file that I have on my 2 different android phones. When I plug it into my computer, it appears in the media folder, For example the first android phone:
/media/F6BA-0AF5/folder/A.log
I want to put that into a variable to be manipulated.... (3 Replies)
Discussion started by: tobenguyen
3 Replies
7. Shell Programming and Scripting
Hello kind programmers :)
I am a newbie and running into an error "line 28: syntax error: unexpected end of file" on the script shown below. Any help would be greatly appreciated. Thanks!
#! /bin/bash
if ($#argv <3) then
echo 'Usage get_modis_snow '
echo 'ftp script for MYD10A2... (2 Replies)
Discussion started by: cmshreve
2 Replies
8. Shell Programming and Scripting
Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
Discussion started by: arsidh
10 Replies
9. Shell Programming and Scripting
Hi,
I am trying to output a set of fields to a file:
set outFile "printHeader.tmp"
set dbFields "REPORT.TIMESTAMP.s,REPORT.CUSTOMER.s,REPORT.CODE.s"
puts $dbFields > $outFile
I receive the following error message:
bad argument "printHeader.tmp": should be "nonewline"
... (2 Replies)
Discussion started by: MrG-San
2 Replies
10. Shell Programming and Scripting
I have a script I use on my web server (Apache2). I am changing to Lighttpd and need to make a few changes.
This is what I use on my apache server
#!/bin/bash
# accepts 3 parameters: <domain name> <user name> <XXXXXXXX>
# domain name is without www (just domain.com)
# username would be... (3 Replies)
Discussion started by: vertical98
3 Replies