10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I want to run a field from an awk command through a command in bash.
For example my input file is
1,2,3
20,30,40
60,70,80
I want tot run $2 thought the command
date +%d/%m/%y -d"01/01/15 + $2 days -1 day"
and get the output
1,02/01/15,3
20,30/01/15,40
60,11/03/15,80
... (2 Replies)
Discussion started by: garethsays
2 Replies
2. Shell Programming and Scripting
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
Discussion started by: alexscript
8 Replies
3. Shell Programming and Scripting
Hi everyone.
I am new to shell scripting and have been looking at quite a few web pages to try and figure this out, but to no avail.
What I am trying to do is get a value from a text file that contains a paragraph of information.. Something similar too:
Welcome to random script
You are... (1 Reply)
Discussion started by: elemenopee
1 Replies
4. Shell Programming and Scripting
My first post here....
I have a few years exp with linux distros and some very basic Python..Ive been intent on learning shell scripting the last few weeks. Please excuse my crude efforts.
I am running a program that takes network data containing US city names in plain text. I am TRYING to... (7 Replies)
Discussion started by: dddkkk
7 Replies
5. Shell Programming and Scripting
I am trying to setup to automatically import a series of mysql database files. I am doing manually now and its a royal pain.
All the sql files are sequentially numbered in a format of 4 numbers underscore text with spaces replaced by underscores.
example:
There are 3 databases each setup... (1 Reply)
Discussion started by: dlm1065
1 Replies
6. Shell Programming and Scripting
Ok I'm working on this school assignment and I'm sure there is a simple solution to this but I can't find it anywhere. The scenario is that I have to write a script with a menu and stuff like that. One of the options has to be to generate a sales report from a database called items.dat. Items.dat... (4 Replies)
Discussion started by: silveronetrx
4 Replies
7. Shell Programming and Scripting
Assume $x equals "".
If I try:
if test -n $x
I get the "Expression syntax" error.
It works in Linux but not in unix bash. In unix bourne I get "test: argument expected" (4 Replies)
Discussion started by: lumix
4 Replies
8. Shell Programming and Scripting
This is probably a really simple problem, but goes easy on me I'm still a newb. The problem I have is that a script (we'll call it script.script) I edited won't run for some reason, I get the error "ksh: script.script: not found"
The location of my script is as follows: /home/users/arkitech
... (3 Replies)
Discussion started by: Arkitech
3 Replies
9. UNIX for Dummies Questions & Answers
I don't even know if this should go here but I just would like to know what this means:
d0e45878043844ffc41aac437e86b602
I know absolutely nothin' about UNIX, and I found this in a SQL table in a board I run.
Someone please tell me what that is in "normal" mode.
Pardon me for my... (4 Replies)
Discussion started by: daeglin
4 Replies
10. Shell Programming and Scripting
I know this is a total begginer question but what is wrong with this picture. My loop wont loop, it just drops me back to the prompt and gives the error "unary operator expected". Any help would be appreciated.
here it is,
#!/bin/sh
selection=
while
do
cat << MENU
1)List files in... (2 Replies)
Discussion started by: Fokus
2 Replies