The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
812 views

Access windows file system from linux shell script

I want to know, whether is it possible to access the Windows files from a shell script on Linux system ? What i am trying to do is to run a shell script in my Linux system, that will access the files ...
1
vote
1answer
95 views

escaping spaces in shell script

yesterday="2010-06-23 00:00:00" today="2010-06-24 00:00:00" mywhere="lastupdate>'$yesterday' and lastupdate<'$today'" mysqldump $param ticket --no-create-info --where=\"$mywhere\" The last ...
-1
votes
1answer
248 views

shell script - while loop, handle the exception

I am running a shell script with a while loop and it exits with the below error, how could I avoid it or catch the error and let the loop to continue ? ie how could I handle the exception stty: ...
-1
votes
4answers
138 views

Shell script for loop is behaving unexpected [closed]

Shell script for loop is behaving unexpected ! The requirement is need to iterate the loop line by line of the property file. Its mandatory to use the for loop. hostnamefl=/tmp/propperty.txt for ...
0
votes
2answers
905 views

How do I parse a log file for one hour with a simple shell script? [closed]

How do I parse a log file using only a shell script, for last one hour? Each hour, the script should execute, parse the previous hour's logs, and the already alerted or listed errors should not ...
-1
votes
3answers
198 views

linux + generate new file with specific structure from text file what the best option

in my Linux machine I have the file orig-file.txt this file include now 4 fields but they could be less or more ( this file generate by other application ) I need advice - what the best option to ...
2
votes
1answer
180 views

nl command + number each line in a text file only from the third line

I want to number each line in a text file on Linux/solaris by nl command but only from the third line - is it possible ? and if yes please advice how ? for example line1 line2 1 line3 2 line4
1
vote
3answers
126 views

Logging with timestamp

I am trying to prepend log entries with a timestamp, but the generated timestamps do not seem to change over time: #!/bin/sh NOW=$(date +"%Y-%m-%d %H:%M:%S") echo "$NOW Logging something" sleep 2 ...
0
votes
2answers
123 views

export command within shell script

When I use export command at command prompt, it works as expected. But it does not work from shell script. [root@server shantanu]# export myip=10 [root@server shantanu]# echo $myip 10 [root@server ...
0
votes
2answers
50 views

Highlight code line by line

Following is the shell script that is expected to pick one line at a time from a given file highlight it. #!/bin/sh > myhighlight.txt file='to_study.php' cat $file | while read -r myline do export ...
0
votes
1answer
295 views

How to create a mailing list in Unix [closed]

I have to write a shell script using a here document that will send a personalized greeting email to each student on a mailing list. I am using following script to sent mail to individual users: $ ...