10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I want to to backup some "default:" values from a file do some other job and after restore that "default:" values back.
The problem is that the source and destination file has a lot of default: strings in it but with different values...
So..
Here is an example:
A part of my source... (6 Replies)
Discussion started by: ausdim
6 Replies
2. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
3. Shell Programming and Scripting
I have a plain text file,
344 392 352 341
405 327 456 765
234 457 874 154
.
.
301 356 789 554
I need a bash script or command (Solaris 10 or Fedora 18) that echos or prints each of the values alongside with the value PLUS ONE, and the value MINUS ONE.
echo $value $value+1 $value-1
... (3 Replies)
Discussion started by: ajp7701
3 Replies
4. Shell Programming and Scripting
Hello, I am trying to build a very compact script for monitoring FS.
I am stuck in a very simple problem (see code comment).
Please for your help
SERVER_NAME=`uname -n`
SCRIPT_DIR=/export/home/scripts/fs_mon4
FLAG_DIR=${SCRIPT_DIR}/flags
TEMP_DIR=${SCRIPT_DIR}/tmp
FS="\/$"... (1 Reply)
Discussion started by: drbiloukos
1 Replies
5. Shell Programming and Scripting
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Discussion started by: karthikeyan_mac
2 Replies
6. Shell Programming and Scripting
I'm trying to write a script that will do an ls of a location, echo it into a file, and then read that file and selectively delete files/folders, so it would go something like this:
cd $CLEAN_LOCN
ls >>$TMP_FILE
while read LINE
do
if LINE = $DONTDELETE
skip
elseif LINE =... (2 Replies)
Discussion started by: MaureenT
2 Replies
7. UNIX for Dummies Questions & Answers
I'm trying to create a header row that contains the filename of a file for all columns.
e.g.
file1.txt
first middle last
1 2 3
4 5 6
desired output file should be:
file1 file1 file1
first middle last
1 2 3
4 5 6
my code is:
for file in *.txt; do echo... (3 Replies)
Discussion started by: calitiggr
3 Replies
8. Shell Programming and Scripting
I'm a beginner of c shell scripting.
How I can echo a whole line from a file with bracket in it?
Ex. Inside the file.txt
abcd efghi
This is what inside the c shell
set IN_FILE = file.txt
set GREP_KEY = 'abcd'
set IN_LINE = `grep ${GREP_KEY} ${IN_FILE}`
echo $IN_LINE
After... (7 Replies)
Discussion started by: zeahr
7 Replies
9. Shell Programming and Scripting
Please help me to simplify my below script.
#!/bin/bash
LOG_FILE=/tmp/log.txt
echo "Hello"
echo "Hello" >> /tmp/log.txt
Is there anyway, that I can echo "Hello" to both screen and file with one single echo command ? (6 Replies)
Discussion started by: phamp008
6 Replies
10. UNIX for Dummies Questions & Answers
I have executeable program: test.exe
echo enter a number
read number
echo a >> file
echo b >> file
echo $x >> file
./test.exe
enter a number
5
cat file I have:
a
b
5
what is another way to save (3 Replies)
Discussion started by: bobo
3 Replies