My scripts works fine apart when I let users enter a "grep string" so they can specify what to grep for.
Basically if the user wants to enter for example
the script would use that grep command for the below bash script section and write the output to $filetowriteWW. Only problem is nothing happens...
set -x output
etc etc.
now we get to the if $grepcommand" contains a string of not which it does and then this happens...
Where did my write to file go? and should '"facebook.com"' not be in the same line as the gzcat command and there be a pipe?
I tried grep 'facebook.com and grep "facebook.com" etc. but no joy
Last edited by GermanJulian; 05-12-2010 at 01:02 PM..
Hello all,
I have a file - 12.txt
cat 12.txt
===============================================
Number of executions = 2 Total execution time (sec.ms) = 0.009883
Number of executions = 8 Total execution time (sec.ms) = 0.001270
Number of... (23 Replies)
Discussion started by: Rahulpict
23 Replies
2. Forum Support Area for Unregistered Users & Account Problems
Hi all,
I am trying to register but it seems my IP address is being seen or black listed as a spam address.
I get the following message:
"Registration denied. Sorry, The UNIX and Linux Forums runs an active policy of not allowing spammers. Please contact us via by posting in this forum if... (0 Replies)
I am running a program written in perl script and it is stopped with "Out of memory!" error. This is very strange because at the time then the program is aborted, it only used 4GB RAM and there are still 30GB free physical memory left in the system. I check the perl script and found the program... (3 Replies)
Hi there,
I'm trying to arrange the output of my script to the one as follows:
--------------
--------
However, after some trial and error, I get this:
--------------
-----------
Is there anyway to do an "autofill" so that the portion aligns?
I'm using a "for-loop" as i'm... (3 Replies)
Hi ,
I have script as follows ,
#!/usr/bin/ksh -x
if
then
alias echo="echo -e"
fi
MAX_ENTRIES=1024
nb_of_entries=`echo "$list_of_entries" | wc -w`
# Set number of tables
eval nb_of_tables=\`expr `expr $nb_of_entries / $MAX_ENTRIES` + 1 \`
# Output the number of tables
echo... (6 Replies)
Does anyone know what is solution for this error ?tar: Exiting with failure status due to previous errors from last 3 days I am trying to take backup of home/user directory getting again and again same error please anyone give me solution (8 Replies)
#!/bin/bash -i
SAVEIFS=$IFS
IFS=$"\n\b"
picc=$*
if ; then
echo $TDATE
if ; then
touch dummy
touch -t "tdate" dummy
touch -r "dummy" "$picc"
else
echo -e "No mod date value to apply. If there is one in your shell,\ninvoke \eStarted asking advice on this (on Linuxquestions.org).... (9 Replies)
Dear community, as already done tons of times, I prepare the RedHat installation on VMWare, then clone it with clonezilla, and finally restore it on final server. Due to different hrdware, I have to boot from rhel-server-7.4-x86_64-boot.iso cd and rewrite the initramfs that contains the hardware... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)