Search Results

Search: Posts Made By: API
3,961
Posted By rovf
You can configure vim to not add the newline at...
You can configure vim to not add the newline at the end. Unless your vim is already quite old, try to put into .vimrc a


set nofixendofline

Whether this is a wise choice, I'm not sure. In...
3,961
Posted By bakunin
I am not a vim developer so i can only speculate:...
I am not a vim developer so i can only speculate: vim - like vi - is not a hex-editor, but a text-editor. As such it (tries to) create(s) "well-formed" text files. A text file in UNIX has to have a...
1,562
Posted By RudiC
Did you consider using the iconv tool to convert...
Did you consider using the iconv tool to convert the files between all the encodings?
And, provided a program was compiled "locale-aware", you can force it to work e.g. in the C locale by setting...
1,055
Posted By RudiC
man regex: Above means: a line feed at the...
man regex:
Above means: a line feed at the begin-of-line or at end-of-line will be removed. You have to know that in sed, the line end is implicitly known, no <LF> in pattern space. Thus a really...
829
Posted By rdrtx1
sed '/^ *:47A/s/$/\/9201/' infile
sed '/^ *:47A/s/$/\/9201/' infile
4,686
Posted By MadeInGermany
If there is no sub directory, and not too many...
If there is no sub directory, and not too many files, then you can simply print them
printf "(%s)\n" Test.dat*
4,686
Posted By RavinderSingh13
Hello API, I don't think there is a need of...
Hello API,

I don't think there is a need of a loop and then putting find command's value to it, you could only use find command to print the file names.

Thanks,
R. Singh
4,686
Posted By rbatte1
The problem is that the for loop is parsing the...
The problem is that the for loop is parsing the arguments it gets, based on the space.

If you let find control the loop, it should work:-
find . -name "Test.*" -exec echo "({})" \;

I get this...
4,686
Posted By RavinderSingh13
Hello API, Could you please try following...
Hello API,

Could you please try following and let me know if this helps you(haven't tested it though).

find -type f -name "* "
Thanks,
R. Singh
4,686
Posted By rovf
RavinderSingh13's response works for me (tested...
RavinderSingh13's response works for me (tested in bash and zsh):


-0-1- ~/tmp > echo xx >'ab '
-0-1- ~/tmp > find . -name '* ' -exec echo '({})' \;
(./ab )


As you can see, I can clearly...
15,729
Posted By disedorgue
Hi, Your problem is not spaces but the not eval...
Hi,
Your problem is not spaces but the not eval of '*'...
Try:
#!/bin/bash
str="/home/hte4993/tmp/Porg Dir/t_"*.txt
chmod 775 "$str"But you must have just only one file either you must use a...
12,967
Posted By rdrtx1
#!/bin/bash IFS="+"...
#!/bin/bash

IFS="+" i_string="TABLE|T_TS+AUSDRUCK|'hans.meier%'+SHIP|'Herr Kanns%'"

for key_value_item in $i_string
do
echo "key_value_item: $key_value_item"
done
12,967
Posted By RavinderSingh13
Hello API, Could you please try following...
Hello API,

Could you please try following and let us know if this helps you.

echo "key_value_item: TABLE|T_TS+AUSDRUCK|'hans.meier%'+SHIP|'Herr Kanns%'" | awk '{Q=$1;$1="";num=split($0,...
1,730
Posted By RavinderSingh13
Hello API, Could you please try following...
Hello API,

Could you please try following steps(not tested though) and let me know if this helps you.
1st: Extract .tar file from .tar.gz file:
gunzip filename.tar.gz
2nd: Update uncompressed...
1,730
Posted By jim mcnamara
First off, using pipes creates temporary files -...
First off, using pipes creates temporary files - just so you know. gzip renames the output file, so no extra files when you are done.

Start with this:

gunzip tarfile.tar.gz
tar -rf...
1,170
Posted By RudiC
Well, then, try to extend RavinderSingh13's...
Well, then, try to extend RavinderSingh13's proposal:ls *.txt | sort -t_ -k3,3 -k1,1
1,170
Posted By RavinderSingh13
Hello API, Could you please try following...
Hello API,

Could you please try following and let me know if this helps, I have checked this on bash.

ls *.txt | sort -t_ -k2,2
Output for above command was as follows.

exec_aabs291_71.txt...
1,170
Posted By RudiC
Unfortunately, your request is not clear. What...
Unfortunately, your request is not clear. What exactly is "the element between the first word and the prefix"? Your two samples are somewhat contradictory as well, so your correct request can't be...
1,170
Posted By Don Cragun
This works fine for ls as long as the number of...
This works fine for ls as long as the number of digits in the part being sorted is always 2 digits, but it won't give you what you want for ls -l output. (Unless all of the files have the same...
1,099
Posted By vgersh99
something along these lines: awk -F'[][,]'...
something along these lines:

awk -F'[][,]' '{printf("Filename=%s%s%s\nFromLine=%s%s%s\nToLine=%s%s%s\n", qq,$2,qq,qq,$(NF-2),qq,qq,$(NF-1),qq)}' qq='"' myFile
1,099
Posted By RavinderSingh13
Hello API, I am sorry for using the same...
Hello API,

I am sorry for using the same variable in both the places, following may help you in same.

cat test34.ksh
awk '{
A=B=$0;
match($0,/file\[.*\] +/);
...
2,771
Posted By Scrutinizer
You need to send the output of gzip to stdout,...
You need to send the output of gzip to stdout, using the -c option. If your files end with .tar.gz try:
for file in *.tar.gz ; do gzip -cd "$file" | tar xf -; done

Some tar implementations...
1,782
Posted By rbatte1
You could test if you are on a terminal or pseudo...
You could test if you are on a terminal or pseudo terminal which would indicate a command line user. Having neither would suggest a scheduler.

The output from ps -otty= -p $$ will give you this....
1,938
Posted By Akshay Hegde
Its upto you, you can print something like this ...
Its upto you, you can print something like this
Usage: create_sql -f <filename> -a <add client> --[pto/pto_list] <filename> --sim
1,938
Posted By Corona688
The square brackets are what I see used to denote...
The square brackets are what I see used to denote a choice usually.

usage: ./command --arg1 --arg2 [--arg3 | --arg4]

Don't think there's really a standard for that though.
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy